aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2007-03-10 17:04:55 -0500
committerDavid S. Miller <davem@sunset.davemloft.net>2007-04-26 01:24:50 -0400
commit31c7711b509d470ab1e175e7bb98ea66a82aa916 (patch)
tree0d6465c947d163bf7bf0803624533e6af964ef50
parent4209fb601c0a0e0a9d90c0008f350dd345c8b7de (diff)
[SK_BUFF]: Some more simple skb_reset_network_header conversions
This time of the type: skb->nh.iph = (struct iphdr *)skb->data; That is completely equivalent to: skb->nh.raw = skb->data; Wonder why people love casts... :-) Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--net/ieee80211/ieee80211_rx.c2
-rw-r--r--net/ipv4/ipmr.c4
-rw-r--r--net/sctp/input.c2
3 files changed, 4 insertions, 4 deletions
diff --git a/net/ieee80211/ieee80211_rx.c b/net/ieee80211/ieee80211_rx.c
index be5ffaf6e8a5..7f5a352800a0 100644
--- a/net/ieee80211/ieee80211_rx.c
+++ b/net/ieee80211/ieee80211_rx.c
@@ -793,7 +793,7 @@ int ieee80211_rx(struct ieee80211_device *ieee, struct sk_buff *skb,
793 skb2->protocol = __constant_htons(ETH_P_802_3); 793 skb2->protocol = __constant_htons(ETH_P_802_3);
794 skb_reset_mac_header(skb2); 794 skb_reset_mac_header(skb2);
795 skb_reset_network_header(skb2); 795 skb_reset_network_header(skb2);
796 /* skb2->nh.raw = skb2->data + ETH_HLEN; */ 796 /* skb2->nh.raw += ETH_HLEN; */
797 dev_queue_xmit(skb2); 797 dev_queue_xmit(skb2);
798 } 798 }
799#endif 799#endif
diff --git a/net/ipv4/ipmr.c b/net/ipv4/ipmr.c
index 05c82ca45aaf..45435f0a5d6c 100644
--- a/net/ipv4/ipmr.c
+++ b/net/ipv4/ipmr.c
@@ -1454,7 +1454,7 @@ int pim_rcv_v1(struct sk_buff * skb)
1454 1454
1455 skb->mac.raw = skb->nh.raw; 1455 skb->mac.raw = skb->nh.raw;
1456 skb_pull(skb, (u8*)encap - skb->data); 1456 skb_pull(skb, (u8*)encap - skb->data);
1457 skb->nh.iph = (struct iphdr *)skb->data; 1457 skb_reset_network_header(skb);
1458 skb->dev = reg_dev; 1458 skb->dev = reg_dev;
1459 skb->protocol = htons(ETH_P_IP); 1459 skb->protocol = htons(ETH_P_IP);
1460 skb->ip_summed = 0; 1460 skb->ip_summed = 0;
@@ -1509,7 +1509,7 @@ static int pim_rcv(struct sk_buff * skb)
1509 1509
1510 skb->mac.raw = skb->nh.raw; 1510 skb->mac.raw = skb->nh.raw;
1511 skb_pull(skb, (u8*)encap - skb->data); 1511 skb_pull(skb, (u8*)encap - skb->data);
1512 skb->nh.iph = (struct iphdr *)skb->data; 1512 skb_reset_network_header(skb);
1513 skb->dev = reg_dev; 1513 skb->dev = reg_dev;
1514 skb->protocol = htons(ETH_P_IP); 1514 skb->protocol = htons(ETH_P_IP);
1515 skb->ip_summed = 0; 1515 skb->ip_summed = 0;
diff --git a/net/sctp/input.c b/net/sctp/input.c
index 71db66873695..2b0863aba3fb 100644
--- a/net/sctp/input.c
+++ b/net/sctp/input.c
@@ -528,7 +528,7 @@ void sctp_v4_err(struct sk_buff *skb, __u32 info)
528 /* Fix up skb to look at the embedded net header. */ 528 /* Fix up skb to look at the embedded net header. */
529 saveip = skb->nh.raw; 529 saveip = skb->nh.raw;
530 savesctp = skb->h.raw; 530 savesctp = skb->h.raw;
531 skb->nh.iph = iph; 531 skb_reset_network_header(skb);
532 skb->h.raw = (char *)sh; 532 skb->h.raw = (char *)sh;
533 sk = sctp_err_lookup(AF_INET, skb, sh, &asoc, &transport); 533 sk = sctp_err_lookup(AF_INET, skb, sh, &asoc, &transport);
534 /* Put back, the original pointers. */ 534 /* Put back, the original pointers. */