/linux-4.1.27/include/net/netfilter/ipv4/ |
H A D | nf_reject.h | 9 void nf_send_reset(struct sk_buff *oldskb, int hook); 11 const struct tcphdr *nf_reject_ip_tcphdr_get(struct sk_buff *oldskb, 14 const struct sk_buff *oldskb, 16 void nf_reject_ip_tcphdr_put(struct sk_buff *nskb, const struct sk_buff *oldskb,
|
/linux-4.1.27/include/net/netfilter/ipv6/ |
H A D | nf_reject.h | 9 void nf_send_reset6(struct net *net, struct sk_buff *oldskb, int hook); 11 const struct tcphdr *nf_reject_ip6_tcphdr_get(struct sk_buff *oldskb, 15 const struct sk_buff *oldskb, 18 const struct sk_buff *oldskb,
|
/linux-4.1.27/net/ipv4/netfilter/ |
H A D | nf_reject_ipv4.c | 19 const struct tcphdr *nf_reject_ip_tcphdr_get(struct sk_buff *oldskb, nf_reject_ip_tcphdr_get() argument 25 if (ip_hdr(oldskb)->frag_off & htons(IP_OFFSET)) nf_reject_ip_tcphdr_get() 28 oth = skb_header_pointer(oldskb, ip_hdrlen(oldskb), nf_reject_ip_tcphdr_get() 38 if (nf_ip_checksum(oldskb, hook, ip_hdrlen(oldskb), IPPROTO_TCP)) nf_reject_ip_tcphdr_get() 46 const struct sk_buff *oldskb, nf_reject_iphdr_put() 49 struct iphdr *niph, *oiph = ip_hdr(oldskb); nf_reject_iphdr_put() 70 void nf_reject_ip_tcphdr_put(struct sk_buff *nskb, const struct sk_buff *oldskb, nf_reject_ip_tcphdr_put() argument 87 oldskb->len - ip_hdrlen(oldskb) - nf_reject_ip_tcphdr_put() 102 void nf_send_reset(struct sk_buff *oldskb, int hook) nf_send_reset() argument 110 oth = nf_reject_ip_tcphdr_get(oldskb, &_oth, hook); nf_send_reset() 114 if (skb_rtable(oldskb)->rt_flags & (RTCF_BROADCAST | RTCF_MULTICAST)) nf_send_reset() 117 oiph = ip_hdr(oldskb); nf_send_reset() 125 skb_dst_set_noref(nskb, skb_dst(oldskb)); nf_send_reset() 128 niph = nf_reject_iphdr_put(nskb, oldskb, IPPROTO_TCP, nf_send_reset() 130 nf_reject_ip_tcphdr_put(nskb, oldskb, oth); nf_send_reset() 139 nf_ct_attach(nskb, oldskb); nf_send_reset() 148 if (oldskb->nf_bridge) { nf_send_reset() 149 struct ethhdr *oeth = eth_hdr(oldskb); nf_send_reset() 151 nskb->dev = nf_bridge_get_physindev(oldskb); nf_send_reset() 45 nf_reject_iphdr_put(struct sk_buff *nskb, const struct sk_buff *oldskb, __u8 protocol, int ttl) nf_reject_iphdr_put() argument
|
/linux-4.1.27/net/bridge/netfilter/ |
H A D | nft_reject_bridge.c | 27 static void nft_reject_br_push_etherhdr(struct sk_buff *oldskb, nft_reject_br_push_etherhdr() argument 34 ether_addr_copy(eth->h_source, eth_hdr(oldskb)->h_dest); nft_reject_br_push_etherhdr() 35 ether_addr_copy(eth->h_dest, eth_hdr(oldskb)->h_source); nft_reject_br_push_etherhdr() 36 eth->h_proto = eth_hdr(oldskb)->h_proto; nft_reject_br_push_etherhdr() 40 /* We cannot use oldskb->dev, it can be either bridge device (NF_BRIDGE INPUT) 43 static void nft_reject_br_send_v4_tcp_reset(struct sk_buff *oldskb, nft_reject_br_send_v4_tcp_reset() argument 52 if (!nft_bridge_iphdr_validate(oldskb)) nft_reject_br_send_v4_tcp_reset() 55 oth = nf_reject_ip_tcphdr_get(oldskb, &_oth, hook); nft_reject_br_send_v4_tcp_reset() 65 niph = nf_reject_iphdr_put(nskb, oldskb, IPPROTO_TCP, nft_reject_br_send_v4_tcp_reset() 67 nf_reject_ip_tcphdr_put(nskb, oldskb, oth); nft_reject_br_send_v4_tcp_reset() 72 nft_reject_br_push_etherhdr(oldskb, nskb); nft_reject_br_send_v4_tcp_reset() 77 static void nft_reject_br_send_v4_unreach(struct sk_buff *oldskb, nft_reject_br_send_v4_unreach() argument 89 if (oldskb->csum_bad || !nft_bridge_iphdr_validate(oldskb)) nft_reject_br_send_v4_unreach() 93 if (ip_hdr(oldskb)->frag_off & htons(IP_OFFSET)) nft_reject_br_send_v4_unreach() 97 len = min_t(unsigned int, 536, oldskb->len); nft_reject_br_send_v4_unreach() 99 if (!pskb_may_pull(oldskb, len)) nft_reject_br_send_v4_unreach() 102 if (pskb_trim_rcsum(oldskb, ntohs(ip_hdr(oldskb)->tot_len))) nft_reject_br_send_v4_unreach() 105 if (ip_hdr(oldskb)->protocol == IPPROTO_TCP || nft_reject_br_send_v4_unreach() 106 ip_hdr(oldskb)->protocol == IPPROTO_UDP) nft_reject_br_send_v4_unreach() 107 proto = ip_hdr(oldskb)->protocol; nft_reject_br_send_v4_unreach() 111 if (!skb_csum_unnecessary(oldskb) && nft_reject_br_send_v4_unreach() 112 nf_ip_checksum(oldskb, hook, ip_hdrlen(oldskb), proto)) nft_reject_br_send_v4_unreach() 121 niph = nf_reject_iphdr_put(nskb, oldskb, IPPROTO_ICMP, nft_reject_br_send_v4_unreach() 131 memcpy(payload, skb_network_header(oldskb), len); nft_reject_br_send_v4_unreach() 139 nft_reject_br_push_etherhdr(oldskb, nskb); nft_reject_br_send_v4_unreach() 145 struct sk_buff *oldskb, nft_reject_br_send_v6_tcp_reset() 155 if (!nft_bridge_ip6hdr_validate(oldskb)) nft_reject_br_send_v6_tcp_reset() 158 oth = nf_reject_ip6_tcphdr_get(oldskb, &_oth, &otcplen, hook); nft_reject_br_send_v6_tcp_reset() 168 nip6h = nf_reject_ip6hdr_put(nskb, oldskb, IPPROTO_TCP, nft_reject_br_send_v6_tcp_reset() 170 nf_reject_ip6_tcphdr_put(nskb, oldskb, oth, otcplen); nft_reject_br_send_v6_tcp_reset() 173 nft_reject_br_push_etherhdr(oldskb, nskb); nft_reject_br_send_v6_tcp_reset() 203 struct sk_buff *oldskb, nft_reject_br_send_v6_unreach() 213 if (!nft_bridge_ip6hdr_validate(oldskb)) nft_reject_br_send_v6_unreach() 219 len = min_t(unsigned int, 1220, oldskb->len); nft_reject_br_send_v6_unreach() 221 if (!pskb_may_pull(oldskb, len)) nft_reject_br_send_v6_unreach() 224 if (!reject6_br_csum_ok(oldskb, hook)) nft_reject_br_send_v6_unreach() 233 nip6h = nf_reject_ip6hdr_put(nskb, oldskb, IPPROTO_ICMPV6, nft_reject_br_send_v6_unreach() 243 memcpy(payload, skb_network_header(oldskb), len); nft_reject_br_send_v6_unreach() 254 nft_reject_br_push_etherhdr(oldskb, nskb); nft_reject_br_send_v6_unreach() 144 nft_reject_br_send_v6_tcp_reset(struct net *net, struct sk_buff *oldskb, const struct net_device *dev, int hook) nft_reject_br_send_v6_tcp_reset() argument 202 nft_reject_br_send_v6_unreach(struct net *net, struct sk_buff *oldskb, const struct net_device *dev, int hook, u8 code) nft_reject_br_send_v6_unreach() argument
|
/linux-4.1.27/net/ipv6/netfilter/ |
H A D | nf_reject_ipv6.c | 19 const struct tcphdr *nf_reject_ip6_tcphdr_get(struct sk_buff *oldskb, nf_reject_ip6_tcphdr_get() argument 23 const struct ipv6hdr *oip6h = ipv6_hdr(oldskb); nf_reject_ip6_tcphdr_get() 29 tcphoff = ipv6_skip_exthdr(oldskb, ((u8*)(oip6h+1) - oldskb->data), nf_reject_ip6_tcphdr_get() 32 if ((tcphoff < 0) || (tcphoff > oldskb->len)) { nf_reject_ip6_tcphdr_get() 37 *otcplen = oldskb->len - tcphoff; nf_reject_ip6_tcphdr_get() 46 otcph = skb_header_pointer(oldskb, tcphoff, sizeof(struct tcphdr), nf_reject_ip6_tcphdr_get() 58 if (nf_ip6_checksum(oldskb, hook, tcphoff, IPPROTO_TCP)) { nf_reject_ip6_tcphdr_get() 68 const struct sk_buff *oldskb, nf_reject_ip6hdr_put() 72 const struct ipv6hdr *oip6h = ipv6_hdr(oldskb); nf_reject_ip6hdr_put() 92 const struct sk_buff *oldskb, nf_reject_ip6_tcphdr_put() 133 void nf_send_reset6(struct net *net, struct sk_buff *oldskb, int hook) nf_send_reset6() argument 139 const struct ipv6hdr *oip6h = ipv6_hdr(oldskb); nf_send_reset6() 150 otcph = nf_reject_ip6_tcphdr_get(oldskb, &_otcph, &otcplen, hook); nf_send_reset6() 160 security_skb_classify_flow(oldskb, flowi6_to_flowi(&fl6)); nf_send_reset6() 184 ip6h = nf_reject_ip6hdr_put(nskb, oldskb, IPPROTO_TCP, nf_send_reset6() 186 nf_reject_ip6_tcphdr_put(nskb, oldskb, otcph, otcplen); nf_send_reset6() 188 nf_ct_attach(nskb, oldskb); nf_send_reset6() 197 if (oldskb->nf_bridge) { nf_send_reset6() 198 struct ethhdr *oeth = eth_hdr(oldskb); nf_send_reset6() 200 nskb->dev = nf_bridge_get_physindev(oldskb); nf_send_reset6() 67 nf_reject_ip6hdr_put(struct sk_buff *nskb, const struct sk_buff *oldskb, __u8 protocol, int hoplimit) nf_reject_ip6hdr_put() argument 91 nf_reject_ip6_tcphdr_put(struct sk_buff *nskb, const struct sk_buff *oldskb, const struct tcphdr *oth, unsigned int otcplen) nf_reject_ip6_tcphdr_put() argument
|
/linux-4.1.27/drivers/atm/ |
H A D | solos-pci.c | 1070 struct sk_buff *oldskb = card->tx_skb[port]; fpga_tx() local 1071 if (oldskb) { fpga_tx() 1072 dma_unmap_single(&card->dev->dev, SKB_CB(oldskb)->dma_addr, fpga_tx() 1073 oldskb->len, DMA_TO_DEVICE); fpga_tx() 1085 oldskb = skb; /* We're done with this skb already */ fpga_tx() 1099 if (!oldskb) fpga_tx() 1102 /* Clean up and free oldskb now it's gone */ fpga_tx() 1104 struct pkt_hdr *header = (void *)oldskb->data; fpga_tx() 1107 skb_pull(oldskb, sizeof(*header)); fpga_tx() 1113 print_buffer(oldskb); fpga_tx() 1116 vcc = SKB_CB(oldskb)->vcc; fpga_tx() 1120 solos_pop(vcc, oldskb); fpga_tx() 1122 dev_kfree_skb_irq(oldskb); fpga_tx()
|