Commit 5d9c5a32920c5c0e6716b0f6ed16157783dc56a4

Authored by Herbert Xu
Committed by David S. Miller
1 parent 00ab956f2f

[IPV4]: Get rid of redundant IPCB->opts initialisation

Now that we always zero the IPCB->opts in ip_rcv, it is no longer
necessary to do so before calling netif_rx for tunneled packets.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>

Showing 6 changed files with 0 additions and 7 deletions Side-by-side Diff

... ... @@ -617,7 +617,6 @@
617 617 skb->mac.raw = skb->nh.raw;
618 618 skb->nh.raw = __pskb_pull(skb, offset);
619 619 skb_postpull_rcsum(skb, skb->h.raw, offset);
620   - memset(&(IPCB(skb)->opt), 0, sizeof(struct ip_options));
621 620 skb->pkt_type = PACKET_HOST;
622 621 #ifdef CONFIG_NET_IPGRE_BROADCAST
623 622 if (MULTICAST(iph->daddr)) {
net/ipv4/ip_options.c
... ... @@ -256,7 +256,6 @@
256 256  
257 257 if (!opt) {
258 258 opt = &(IPCB(skb)->opt);
259   - memset(opt, 0, sizeof(struct ip_options));
260 259 iph = skb->nh.raw;
261 260 opt->optlen = ((struct iphdr *)iph)->ihl*4 - sizeof(struct iphdr);
262 261 optptr = iph + sizeof(struct iphdr);
... ... @@ -487,7 +487,6 @@
487 487  
488 488 skb->mac.raw = skb->nh.raw;
489 489 skb->nh.raw = skb->data;
490   - memset(&(IPCB(skb)->opt), 0, sizeof(struct ip_options));
491 490 skb->protocol = htons(ETH_P_IP);
492 491 skb->pkt_type = PACKET_HOST;
493 492  
... ... @@ -1461,7 +1461,6 @@
1461 1461 skb_pull(skb, (u8*)encap - skb->data);
1462 1462 skb->nh.iph = (struct iphdr *)skb->data;
1463 1463 skb->dev = reg_dev;
1464   - memset(&(IPCB(skb)->opt), 0, sizeof(struct ip_options));
1465 1464 skb->protocol = htons(ETH_P_IP);
1466 1465 skb->ip_summed = 0;
1467 1466 skb->pkt_type = PACKET_HOST;
... ... @@ -1517,7 +1516,6 @@
1517 1516 skb_pull(skb, (u8*)encap - skb->data);
1518 1517 skb->nh.iph = (struct iphdr *)skb->data;
1519 1518 skb->dev = reg_dev;
1520   - memset(&(IPCB(skb)->opt), 0, sizeof(struct ip_options));
1521 1519 skb->protocol = htons(ETH_P_IP);
1522 1520 skb->ip_summed = 0;
1523 1521 skb->pkt_type = PACKET_HOST;
net/ipv4/xfrm4_mode_tunnel.c
... ... @@ -92,7 +92,6 @@
92 92 skb->mac.raw = memmove(skb->data - skb->mac_len,
93 93 skb->mac.raw, skb->mac_len);
94 94 skb->nh.raw = skb->data;
95   - memset(&(IPCB(skb)->opt), 0, sizeof(struct ip_options));
96 95 err = 0;
97 96  
98 97 out:
... ... @@ -380,7 +380,6 @@
380 380 secpath_reset(skb);
381 381 skb->mac.raw = skb->nh.raw;
382 382 skb->nh.raw = skb->data;
383   - memset(&(IPCB(skb)->opt), 0, sizeof(struct ip_options));
384 383 IPCB(skb)->flags = 0;
385 384 skb->protocol = htons(ETH_P_IPV6);
386 385 skb->pkt_type = PACKET_HOST;