diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2007-04-11 00:21:55 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-04-26 01:26:20 -0400 |
commit | b0e380b1d8a8e0aca215df97702f99815f05c094 (patch) | |
tree | 95f402ca155f5211150178811669ebf0a88e8e00 | |
parent | cfe1fc7759fdacb0c650b575daed1692bf3eaece (diff) |
[SK_BUFF]: unions of just one member don't get anything done, kill them
Renaming skb->h to skb->transport_header, skb->nh to skb->network_header and
skb->mac to skb->mac_header, to match the names of the associated helpers
(skb[_[re]set]_{transport,network,mac}_header).
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
46 files changed, 162 insertions, 165 deletions
diff --git a/drivers/net/arcnet/arcnet.c b/drivers/net/arcnet/arcnet.c index 83004fdab0a4..681e20b8466f 100644 --- a/drivers/net/arcnet/arcnet.c +++ b/drivers/net/arcnet/arcnet.c | |||
@@ -519,9 +519,12 @@ static int arcnet_header(struct sk_buff *skb, struct net_device *dev, | |||
519 | * real header when we do rebuild_header. | 519 | * real header when we do rebuild_header. |
520 | */ | 520 | */ |
521 | *(uint16_t *) skb_push(skb, 2) = type; | 521 | *(uint16_t *) skb_push(skb, 2) = type; |
522 | if (skb->nh.raw - skb->mac.raw != 2) | 522 | /* |
523 | * XXX: Why not use skb->mac_len? | ||
524 | */ | ||
525 | if (skb->network_header - skb->mac_header != 2) | ||
523 | BUGMSG(D_NORMAL, "arcnet_header: Yikes! diff (%d) is not 2!\n", | 526 | BUGMSG(D_NORMAL, "arcnet_header: Yikes! diff (%d) is not 2!\n", |
524 | (int)(skb->nh.raw - skb->mac.raw)); | 527 | (int)(skb->network_header - skb->mac_header)); |
525 | return -2; /* return error -- can't transmit yet! */ | 528 | return -2; /* return error -- can't transmit yet! */ |
526 | } | 529 | } |
527 | else { | 530 | else { |
@@ -554,11 +557,13 @@ static int arcnet_rebuild_header(struct sk_buff *skb) | |||
554 | unsigned short type; | 557 | unsigned short type; |
555 | uint8_t daddr=0; | 558 | uint8_t daddr=0; |
556 | struct ArcProto *proto; | 559 | struct ArcProto *proto; |
557 | 560 | /* | |
558 | if (skb->nh.raw - skb->mac.raw != 2) { | 561 | * XXX: Why not use skb->mac_len? |
562 | */ | ||
563 | if (skb->network_header - skb->mac_header != 2) { | ||
559 | BUGMSG(D_NORMAL, | 564 | BUGMSG(D_NORMAL, |
560 | "rebuild_header: shouldn't be here! (hdrsize=%d)\n", | 565 | "rebuild_header: shouldn't be here! (hdrsize=%d)\n", |
561 | (int)(skb->nh.raw - skb->mac.raw)); | 566 | (int)(skb->network_header - skb->mac_header)); |
562 | return 0; | 567 | return 0; |
563 | } | 568 | } |
564 | type = *(uint16_t *) skb_pull(skb, 2); | 569 | type = *(uint16_t *) skb_pull(skb, 2); |
diff --git a/drivers/net/bonding/bond_3ad.c b/drivers/net/bonding/bond_3ad.c index 05c870d6f6c3..7e03f41ae2c2 100644 --- a/drivers/net/bonding/bond_3ad.c +++ b/drivers/net/bonding/bond_3ad.c | |||
@@ -885,7 +885,7 @@ static int ad_lacpdu_send(struct port *port) | |||
885 | 885 | ||
886 | skb->dev = slave->dev; | 886 | skb->dev = slave->dev; |
887 | skb_reset_mac_header(skb); | 887 | skb_reset_mac_header(skb); |
888 | skb->nh.raw = skb->mac.raw + ETH_HLEN; | 888 | skb->network_header = skb->mac_header + ETH_HLEN; |
889 | skb->protocol = PKT_TYPE_LACPDU; | 889 | skb->protocol = PKT_TYPE_LACPDU; |
890 | skb->priority = TC_PRIO_CONTROL; | 890 | skb->priority = TC_PRIO_CONTROL; |
891 | 891 | ||
@@ -929,7 +929,7 @@ static int ad_marker_send(struct port *port, struct marker *marker) | |||
929 | 929 | ||
930 | skb->dev = slave->dev; | 930 | skb->dev = slave->dev; |
931 | skb_reset_mac_header(skb); | 931 | skb_reset_mac_header(skb); |
932 | skb->nh.raw = skb->mac.raw + ETH_HLEN; | 932 | skb->network_header = skb->mac_header + ETH_HLEN; |
933 | skb->protocol = PKT_TYPE_LACPDU; | 933 | skb->protocol = PKT_TYPE_LACPDU; |
934 | 934 | ||
935 | marker_header = (struct marker_header *)skb_put(skb, length); | 935 | marker_header = (struct marker_header *)skb_put(skb, length); |
diff --git a/drivers/net/bonding/bond_alb.c b/drivers/net/bonding/bond_alb.c index b8cf777542fa..92c3b6f6a8e7 100644 --- a/drivers/net/bonding/bond_alb.c +++ b/drivers/net/bonding/bond_alb.c | |||
@@ -896,7 +896,7 @@ static void alb_send_learning_packets(struct slave *slave, u8 mac_addr[]) | |||
896 | memcpy(data, &pkt, size); | 896 | memcpy(data, &pkt, size); |
897 | 897 | ||
898 | skb_reset_mac_header(skb); | 898 | skb_reset_mac_header(skb); |
899 | skb->nh.raw = skb->mac.raw + ETH_HLEN; | 899 | skb->network_header = skb->mac_header + ETH_HLEN; |
900 | skb->protocol = pkt.type; | 900 | skb->protocol = pkt.type; |
901 | skb->priority = TC_PRIO_CONTROL; | 901 | skb->priority = TC_PRIO_CONTROL; |
902 | skb->dev = slave->dev; | 902 | skb->dev = slave->dev; |
diff --git a/drivers/net/wireless/hostap/hostap_80211_rx.c b/drivers/net/wireless/hostap/hostap_80211_rx.c index 7b7c1ca8f1f4..35a3a50724fe 100644 --- a/drivers/net/wireless/hostap/hostap_80211_rx.c +++ b/drivers/net/wireless/hostap/hostap_80211_rx.c | |||
@@ -1077,7 +1077,7 @@ void hostap_80211_rx(struct net_device *dev, struct sk_buff *skb, | |||
1077 | skb2->protocol = __constant_htons(ETH_P_802_3); | 1077 | skb2->protocol = __constant_htons(ETH_P_802_3); |
1078 | skb_reset_mac_header(skb2); | 1078 | skb_reset_mac_header(skb2); |
1079 | skb_reset_network_header(skb2); | 1079 | skb_reset_network_header(skb2); |
1080 | /* skb2->nh.raw += ETH_HLEN; */ | 1080 | /* skb2->network_header += ETH_HLEN; */ |
1081 | dev_queue_xmit(skb2); | 1081 | dev_queue_xmit(skb2); |
1082 | } | 1082 | } |
1083 | 1083 | ||
diff --git a/include/linux/if_vlan.h b/include/linux/if_vlan.h index 544490d9d0bd..81e9bc93569b 100644 --- a/include/linux/if_vlan.h +++ b/include/linux/if_vlan.h | |||
@@ -275,8 +275,8 @@ static inline struct sk_buff *__vlan_put_tag(struct sk_buff *skb, unsigned short | |||
275 | veth->h_vlan_TCI = htons(tag); | 275 | veth->h_vlan_TCI = htons(tag); |
276 | 276 | ||
277 | skb->protocol = __constant_htons(ETH_P_8021Q); | 277 | skb->protocol = __constant_htons(ETH_P_8021Q); |
278 | skb->mac.raw -= VLAN_HLEN; | 278 | skb->mac_header -= VLAN_HLEN; |
279 | skb->nh.raw -= VLAN_HLEN; | 279 | skb->network_header -= VLAN_HLEN; |
280 | 280 | ||
281 | return skb; | 281 | return skb; |
282 | } | 282 | } |
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index 230dd43fc9b3..c45ad1263271 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h | |||
@@ -69,8 +69,8 @@ | |||
69 | * NONE: skb is checksummed by protocol or csum is not required. | 69 | * NONE: skb is checksummed by protocol or csum is not required. |
70 | * | 70 | * |
71 | * PARTIAL: device is required to csum packet as seen by hard_start_xmit | 71 | * PARTIAL: device is required to csum packet as seen by hard_start_xmit |
72 | * from skb->h.raw to the end and to record the checksum | 72 | * from skb->transport_header to the end and to record the checksum |
73 | * at skb->h.raw+skb->csum. | 73 | * at skb->transport_header + skb->csum. |
74 | * | 74 | * |
75 | * Device must show its capabilities in dev->features, set | 75 | * Device must show its capabilities in dev->features, set |
76 | * at device setup time. | 76 | * at device setup time. |
@@ -188,8 +188,8 @@ enum { | |||
188 | * @dev: Device we arrived on/are leaving by | 188 | * @dev: Device we arrived on/are leaving by |
189 | * @iif: ifindex of device we arrived on | 189 | * @iif: ifindex of device we arrived on |
190 | * @h: Transport layer header | 190 | * @h: Transport layer header |
191 | * @nh: Network layer header | 191 | * @network_header: Network layer header |
192 | * @mac: Link layer header | 192 | * @mac_header: Link layer header |
193 | * @dst: destination entry | 193 | * @dst: destination entry |
194 | * @sp: the security path, used for xfrm | 194 | * @sp: the security path, used for xfrm |
195 | * @cb: Control buffer. Free for use by every layer. Put private vars here | 195 | * @cb: Control buffer. Free for use by every layer. Put private vars here |
@@ -236,18 +236,9 @@ struct sk_buff { | |||
236 | int iif; | 236 | int iif; |
237 | /* 4 byte hole on 64 bit*/ | 237 | /* 4 byte hole on 64 bit*/ |
238 | 238 | ||
239 | union { | 239 | unsigned char *transport_header; |
240 | unsigned char *raw; | 240 | unsigned char *network_header; |
241 | } h; | 241 | unsigned char *mac_header; |
242 | |||
243 | union { | ||
244 | unsigned char *raw; | ||
245 | } nh; | ||
246 | |||
247 | union { | ||
248 | unsigned char *raw; | ||
249 | } mac; | ||
250 | |||
251 | struct dst_entry *dst; | 242 | struct dst_entry *dst; |
252 | struct sec_path *sp; | 243 | struct sec_path *sp; |
253 | 244 | ||
@@ -953,68 +944,68 @@ static inline void skb_reserve(struct sk_buff *skb, int len) | |||
953 | 944 | ||
954 | static inline unsigned char *skb_transport_header(const struct sk_buff *skb) | 945 | static inline unsigned char *skb_transport_header(const struct sk_buff *skb) |
955 | { | 946 | { |
956 | return skb->h.raw; | 947 | return skb->transport_header; |
957 | } | 948 | } |
958 | 949 | ||
959 | static inline void skb_reset_transport_header(struct sk_buff *skb) | 950 | static inline void skb_reset_transport_header(struct sk_buff *skb) |
960 | { | 951 | { |
961 | skb->h.raw = skb->data; | 952 | skb->transport_header = skb->data; |
962 | } | 953 | } |
963 | 954 | ||
964 | static inline void skb_set_transport_header(struct sk_buff *skb, | 955 | static inline void skb_set_transport_header(struct sk_buff *skb, |
965 | const int offset) | 956 | const int offset) |
966 | { | 957 | { |
967 | skb->h.raw = skb->data + offset; | 958 | skb->transport_header = skb->data + offset; |
968 | } | 959 | } |
969 | 960 | ||
970 | static inline int skb_transport_offset(const struct sk_buff *skb) | 961 | static inline int skb_transport_offset(const struct sk_buff *skb) |
971 | { | 962 | { |
972 | return skb->h.raw - skb->data; | 963 | return skb->transport_header - skb->data; |
973 | } | 964 | } |
974 | 965 | ||
975 | static inline unsigned char *skb_network_header(const struct sk_buff *skb) | 966 | static inline unsigned char *skb_network_header(const struct sk_buff *skb) |
976 | { | 967 | { |
977 | return skb->nh.raw; | 968 | return skb->network_header; |
978 | } | 969 | } |
979 | 970 | ||
980 | static inline void skb_reset_network_header(struct sk_buff *skb) | 971 | static inline void skb_reset_network_header(struct sk_buff *skb) |
981 | { | 972 | { |
982 | skb->nh.raw = skb->data; | 973 | skb->network_header = skb->data; |
983 | } | 974 | } |
984 | 975 | ||
985 | static inline void skb_set_network_header(struct sk_buff *skb, const int offset) | 976 | static inline void skb_set_network_header(struct sk_buff *skb, const int offset) |
986 | { | 977 | { |
987 | skb->nh.raw = skb->data + offset; | 978 | skb->network_header = skb->data + offset; |
988 | } | 979 | } |
989 | 980 | ||
990 | static inline int skb_network_offset(const struct sk_buff *skb) | 981 | static inline int skb_network_offset(const struct sk_buff *skb) |
991 | { | 982 | { |
992 | return skb->nh.raw - skb->data; | 983 | return skb->network_header - skb->data; |
993 | } | 984 | } |
994 | 985 | ||
995 | static inline u32 skb_network_header_len(const struct sk_buff *skb) | 986 | static inline u32 skb_network_header_len(const struct sk_buff *skb) |
996 | { | 987 | { |
997 | return skb->h.raw - skb->nh.raw; | 988 | return skb->transport_header - skb->network_header; |
998 | } | 989 | } |
999 | 990 | ||
1000 | static inline unsigned char *skb_mac_header(const struct sk_buff *skb) | 991 | static inline unsigned char *skb_mac_header(const struct sk_buff *skb) |
1001 | { | 992 | { |
1002 | return skb->mac.raw; | 993 | return skb->mac_header; |
1003 | } | 994 | } |
1004 | 995 | ||
1005 | static inline int skb_mac_header_was_set(const struct sk_buff *skb) | 996 | static inline int skb_mac_header_was_set(const struct sk_buff *skb) |
1006 | { | 997 | { |
1007 | return skb->mac.raw != NULL; | 998 | return skb->mac_header != NULL; |
1008 | } | 999 | } |
1009 | 1000 | ||
1010 | static inline void skb_reset_mac_header(struct sk_buff *skb) | 1001 | static inline void skb_reset_mac_header(struct sk_buff *skb) |
1011 | { | 1002 | { |
1012 | skb->mac.raw = skb->data; | 1003 | skb->mac_header = skb->data; |
1013 | } | 1004 | } |
1014 | 1005 | ||
1015 | static inline void skb_set_mac_header(struct sk_buff *skb, const int offset) | 1006 | static inline void skb_set_mac_header(struct sk_buff *skb, const int offset) |
1016 | { | 1007 | { |
1017 | skb->mac.raw = skb->data + offset; | 1008 | skb->mac_header = skb->data + offset; |
1018 | } | 1009 | } |
1019 | 1010 | ||
1020 | /* | 1011 | /* |
diff --git a/net/802/psnap.c b/net/802/psnap.c index 7cba1f426081..04ee43e7538f 100644 --- a/net/802/psnap.c +++ b/net/802/psnap.c | |||
@@ -59,7 +59,7 @@ static int snap_rcv(struct sk_buff *skb, struct net_device *dev, | |||
59 | proto = find_snap_client(skb_transport_header(skb)); | 59 | proto = find_snap_client(skb_transport_header(skb)); |
60 | if (proto) { | 60 | if (proto) { |
61 | /* Pass the frame on. */ | 61 | /* Pass the frame on. */ |
62 | skb->h.raw += 5; | 62 | skb->transport_header += 5; |
63 | skb_pull_rcsum(skb, 5); | 63 | skb_pull_rcsum(skb, 5); |
64 | rc = proto->rcvfunc(skb, dev, &snap_packet_type, orig_dev); | 64 | rc = proto->rcvfunc(skb, dev, &snap_packet_type, orig_dev); |
65 | } else { | 65 | } else { |
diff --git a/net/8021q/vlan_dev.c b/net/8021q/vlan_dev.c index 0991e293940f..42a35bed0881 100644 --- a/net/8021q/vlan_dev.c +++ b/net/8021q/vlan_dev.c | |||
@@ -83,7 +83,7 @@ static inline struct sk_buff *vlan_check_reorder_header(struct sk_buff *skb) | |||
83 | /* Lifted from Gleb's VLAN code... */ | 83 | /* Lifted from Gleb's VLAN code... */ |
84 | memmove(skb->data - ETH_HLEN, | 84 | memmove(skb->data - ETH_HLEN, |
85 | skb->data - VLAN_ETH_HLEN, 12); | 85 | skb->data - VLAN_ETH_HLEN, 12); |
86 | skb->mac.raw += VLAN_HLEN; | 86 | skb->mac_header += VLAN_HLEN; |
87 | } | 87 | } |
88 | } | 88 | } |
89 | 89 | ||
diff --git a/net/appletalk/ddp.c b/net/appletalk/ddp.c index 137341b4d833..f6a92a0b7aa6 100644 --- a/net/appletalk/ddp.c +++ b/net/appletalk/ddp.c | |||
@@ -1383,10 +1383,10 @@ free_it: | |||
1383 | * @pt - packet type | 1383 | * @pt - packet type |
1384 | * | 1384 | * |
1385 | * Receive a packet (in skb) from device dev. This has come from the SNAP | 1385 | * Receive a packet (in skb) from device dev. This has come from the SNAP |
1386 | * decoder, and on entry skb->h.raw is the DDP header, skb->len is the DDP | 1386 | * decoder, and on entry skb->transport_header is the DDP header, skb->len |
1387 | * header, skb->len is the DDP length. The physical headers have been | 1387 | * is the DDP header, skb->len is the DDP length. The physical headers |
1388 | * extracted. PPP should probably pass frames marked as for this layer. | 1388 | * have been extracted. PPP should probably pass frames marked as for this |
1389 | * [ie ARPHRD_ETHERTALK] | 1389 | * layer. [ie ARPHRD_ETHERTALK] |
1390 | */ | 1390 | */ |
1391 | static int atalk_rcv(struct sk_buff *skb, struct net_device *dev, | 1391 | static int atalk_rcv(struct sk_buff *skb, struct net_device *dev, |
1392 | struct packet_type *pt, struct net_device *orig_dev) | 1392 | struct packet_type *pt, struct net_device *orig_dev) |
diff --git a/net/bridge/br_netfilter.c b/net/bridge/br_netfilter.c index f2796c97b4a2..8cee7fdc16c3 100644 --- a/net/bridge/br_netfilter.c +++ b/net/bridge/br_netfilter.c | |||
@@ -174,7 +174,7 @@ static int br_nf_pre_routing_finish_ipv6(struct sk_buff *skb) | |||
174 | skb->dev = nf_bridge->physindev; | 174 | skb->dev = nf_bridge->physindev; |
175 | if (skb->protocol == htons(ETH_P_8021Q)) { | 175 | if (skb->protocol == htons(ETH_P_8021Q)) { |
176 | skb_push(skb, VLAN_HLEN); | 176 | skb_push(skb, VLAN_HLEN); |
177 | skb->nh.raw -= VLAN_HLEN; | 177 | skb->network_header -= VLAN_HLEN; |
178 | } | 178 | } |
179 | NF_HOOK_THRESH(PF_BRIDGE, NF_BR_PRE_ROUTING, skb, skb->dev, NULL, | 179 | NF_HOOK_THRESH(PF_BRIDGE, NF_BR_PRE_ROUTING, skb, skb->dev, NULL, |
180 | br_handle_frame_finish, 1); | 180 | br_handle_frame_finish, 1); |
@@ -255,7 +255,7 @@ static int br_nf_pre_routing_finish_bridge(struct sk_buff *skb) | |||
255 | else { | 255 | else { |
256 | if (skb->protocol == htons(ETH_P_8021Q)) { | 256 | if (skb->protocol == htons(ETH_P_8021Q)) { |
257 | skb_pull(skb, VLAN_HLEN); | 257 | skb_pull(skb, VLAN_HLEN); |
258 | skb->nh.raw += VLAN_HLEN; | 258 | skb->network_header += VLAN_HLEN; |
259 | } | 259 | } |
260 | skb->dst->output(skb); | 260 | skb->dst->output(skb); |
261 | } | 261 | } |
@@ -325,7 +325,7 @@ bridged_dnat: | |||
325 | if (skb->protocol == | 325 | if (skb->protocol == |
326 | htons(ETH_P_8021Q)) { | 326 | htons(ETH_P_8021Q)) { |
327 | skb_push(skb, VLAN_HLEN); | 327 | skb_push(skb, VLAN_HLEN); |
328 | skb->nh.raw -= VLAN_HLEN; | 328 | skb->network_header -= VLAN_HLEN; |
329 | } | 329 | } |
330 | NF_HOOK_THRESH(PF_BRIDGE, NF_BR_PRE_ROUTING, | 330 | NF_HOOK_THRESH(PF_BRIDGE, NF_BR_PRE_ROUTING, |
331 | skb, skb->dev, NULL, | 331 | skb, skb->dev, NULL, |
@@ -344,7 +344,7 @@ bridged_dnat: | |||
344 | skb->dev = nf_bridge->physindev; | 344 | skb->dev = nf_bridge->physindev; |
345 | if (skb->protocol == htons(ETH_P_8021Q)) { | 345 | if (skb->protocol == htons(ETH_P_8021Q)) { |
346 | skb_push(skb, VLAN_HLEN); | 346 | skb_push(skb, VLAN_HLEN); |
347 | skb->nh.raw -= VLAN_HLEN; | 347 | skb->network_header -= VLAN_HLEN; |
348 | } | 348 | } |
349 | NF_HOOK_THRESH(PF_BRIDGE, NF_BR_PRE_ROUTING, skb, skb->dev, NULL, | 349 | NF_HOOK_THRESH(PF_BRIDGE, NF_BR_PRE_ROUTING, skb, skb->dev, NULL, |
350 | br_handle_frame_finish, 1); | 350 | br_handle_frame_finish, 1); |
@@ -497,7 +497,7 @@ static unsigned int br_nf_pre_routing(unsigned int hook, struct sk_buff **pskb, | |||
497 | 497 | ||
498 | if (skb->protocol == htons(ETH_P_8021Q)) { | 498 | if (skb->protocol == htons(ETH_P_8021Q)) { |
499 | skb_pull_rcsum(skb, VLAN_HLEN); | 499 | skb_pull_rcsum(skb, VLAN_HLEN); |
500 | skb->nh.raw += VLAN_HLEN; | 500 | skb->network_header += VLAN_HLEN; |
501 | } | 501 | } |
502 | return br_nf_pre_routing_ipv6(hook, skb, in, out, okfn); | 502 | return br_nf_pre_routing_ipv6(hook, skb, in, out, okfn); |
503 | } | 503 | } |
@@ -514,7 +514,7 @@ static unsigned int br_nf_pre_routing(unsigned int hook, struct sk_buff **pskb, | |||
514 | 514 | ||
515 | if (skb->protocol == htons(ETH_P_8021Q)) { | 515 | if (skb->protocol == htons(ETH_P_8021Q)) { |
516 | skb_pull_rcsum(skb, VLAN_HLEN); | 516 | skb_pull_rcsum(skb, VLAN_HLEN); |
517 | skb->nh.raw += VLAN_HLEN; | 517 | skb->network_header += VLAN_HLEN; |
518 | } | 518 | } |
519 | 519 | ||
520 | if (!pskb_may_pull(skb, sizeof(struct iphdr))) | 520 | if (!pskb_may_pull(skb, sizeof(struct iphdr))) |
@@ -595,7 +595,7 @@ static int br_nf_forward_finish(struct sk_buff *skb) | |||
595 | } | 595 | } |
596 | if (skb->protocol == htons(ETH_P_8021Q)) { | 596 | if (skb->protocol == htons(ETH_P_8021Q)) { |
597 | skb_push(skb, VLAN_HLEN); | 597 | skb_push(skb, VLAN_HLEN); |
598 | skb->nh.raw -= VLAN_HLEN; | 598 | skb->network_header -= VLAN_HLEN; |
599 | } | 599 | } |
600 | NF_HOOK_THRESH(PF_BRIDGE, NF_BR_FORWARD, skb, in, | 600 | NF_HOOK_THRESH(PF_BRIDGE, NF_BR_FORWARD, skb, in, |
601 | skb->dev, br_forward_finish, 1); | 601 | skb->dev, br_forward_finish, 1); |
@@ -631,7 +631,7 @@ static unsigned int br_nf_forward_ip(unsigned int hook, struct sk_buff **pskb, | |||
631 | 631 | ||
632 | if (skb->protocol == htons(ETH_P_8021Q)) { | 632 | if (skb->protocol == htons(ETH_P_8021Q)) { |
633 | skb_pull(*pskb, VLAN_HLEN); | 633 | skb_pull(*pskb, VLAN_HLEN); |
634 | (*pskb)->nh.raw += VLAN_HLEN; | 634 | (*pskb)->network_header += VLAN_HLEN; |
635 | } | 635 | } |
636 | 636 | ||
637 | nf_bridge = skb->nf_bridge; | 637 | nf_bridge = skb->nf_bridge; |
@@ -667,13 +667,13 @@ static unsigned int br_nf_forward_arp(unsigned int hook, struct sk_buff **pskb, | |||
667 | if (!IS_VLAN_ARP(skb)) | 667 | if (!IS_VLAN_ARP(skb)) |
668 | return NF_ACCEPT; | 668 | return NF_ACCEPT; |
669 | skb_pull(*pskb, VLAN_HLEN); | 669 | skb_pull(*pskb, VLAN_HLEN); |
670 | (*pskb)->nh.raw += VLAN_HLEN; | 670 | (*pskb)->network_header += VLAN_HLEN; |
671 | } | 671 | } |
672 | 672 | ||
673 | if (arp_hdr(skb)->ar_pln != 4) { | 673 | if (arp_hdr(skb)->ar_pln != 4) { |
674 | if (IS_VLAN_ARP(skb)) { | 674 | if (IS_VLAN_ARP(skb)) { |
675 | skb_push(*pskb, VLAN_HLEN); | 675 | skb_push(*pskb, VLAN_HLEN); |
676 | (*pskb)->nh.raw -= VLAN_HLEN; | 676 | (*pskb)->network_header -= VLAN_HLEN; |
677 | } | 677 | } |
678 | return NF_ACCEPT; | 678 | return NF_ACCEPT; |
679 | } | 679 | } |
@@ -723,7 +723,7 @@ static unsigned int br_nf_local_out(unsigned int hook, struct sk_buff **pskb, | |||
723 | } | 723 | } |
724 | if (skb->protocol == htons(ETH_P_8021Q)) { | 724 | if (skb->protocol == htons(ETH_P_8021Q)) { |
725 | skb_push(skb, VLAN_HLEN); | 725 | skb_push(skb, VLAN_HLEN); |
726 | skb->nh.raw -= VLAN_HLEN; | 726 | skb->network_header -= VLAN_HLEN; |
727 | } | 727 | } |
728 | 728 | ||
729 | NF_HOOK(PF_BRIDGE, NF_BR_FORWARD, skb, realindev, skb->dev, | 729 | NF_HOOK(PF_BRIDGE, NF_BR_FORWARD, skb, realindev, skb->dev, |
@@ -790,7 +790,7 @@ static unsigned int br_nf_post_routing(unsigned int hook, struct sk_buff **pskb, | |||
790 | 790 | ||
791 | if (skb->protocol == htons(ETH_P_8021Q)) { | 791 | if (skb->protocol == htons(ETH_P_8021Q)) { |
792 | skb_pull(skb, VLAN_HLEN); | 792 | skb_pull(skb, VLAN_HLEN); |
793 | skb->nh.raw += VLAN_HLEN; | 793 | skb->network_header += VLAN_HLEN; |
794 | } | 794 | } |
795 | 795 | ||
796 | nf_bridge_save_header(skb); | 796 | nf_bridge_save_header(skb); |
diff --git a/net/core/dev.c b/net/core/dev.c index 30fcc7f9d4ed..6562e5736e2f 100644 --- a/net/core/dev.c +++ b/net/core/dev.c | |||
@@ -1077,7 +1077,7 @@ static void dev_queue_xmit_nit(struct sk_buff *skb, struct net_device *dev) | |||
1077 | skb_reset_network_header(skb2); | 1077 | skb_reset_network_header(skb2); |
1078 | } | 1078 | } |
1079 | 1079 | ||
1080 | skb2->h.raw = skb2->nh.raw; | 1080 | skb2->transport_header = skb2->network_header; |
1081 | skb2->pkt_type = PACKET_OUTGOING; | 1081 | skb2->pkt_type = PACKET_OUTGOING; |
1082 | ptype->func(skb2, skb->dev, ptype, skb->dev); | 1082 | ptype->func(skb2, skb->dev, ptype, skb->dev); |
1083 | } | 1083 | } |
@@ -1207,7 +1207,7 @@ struct sk_buff *skb_gso_segment(struct sk_buff *skb, int features) | |||
1207 | BUG_ON(skb_shinfo(skb)->frag_list); | 1207 | BUG_ON(skb_shinfo(skb)->frag_list); |
1208 | 1208 | ||
1209 | skb_reset_mac_header(skb); | 1209 | skb_reset_mac_header(skb); |
1210 | skb->mac_len = skb->nh.raw - skb->mac.raw; | 1210 | skb->mac_len = skb->network_header - skb->mac_header; |
1211 | __skb_pull(skb, skb->mac_len); | 1211 | __skb_pull(skb, skb->mac_len); |
1212 | 1212 | ||
1213 | if (unlikely(skb->ip_summed != CHECKSUM_PARTIAL)) { | 1213 | if (unlikely(skb->ip_summed != CHECKSUM_PARTIAL)) { |
@@ -1774,7 +1774,7 @@ int netif_receive_skb(struct sk_buff *skb) | |||
1774 | 1774 | ||
1775 | skb_reset_network_header(skb); | 1775 | skb_reset_network_header(skb); |
1776 | skb_reset_transport_header(skb); | 1776 | skb_reset_transport_header(skb); |
1777 | skb->mac_len = skb->nh.raw - skb->mac.raw; | 1777 | skb->mac_len = skb->network_header - skb->mac_header; |
1778 | 1778 | ||
1779 | pt_prev = NULL; | 1779 | pt_prev = NULL; |
1780 | 1780 | ||
diff --git a/net/core/pktgen.c b/net/core/pktgen.c index ae8cf9a285fd..9da8357addcd 100644 --- a/net/core/pktgen.c +++ b/net/core/pktgen.c | |||
@@ -2358,7 +2358,7 @@ static struct sk_buff *fill_packet_ipv4(struct net_device *odev, | |||
2358 | } | 2358 | } |
2359 | 2359 | ||
2360 | skb_set_network_header(skb, skb->tail - skb->data); | 2360 | skb_set_network_header(skb, skb->tail - skb->data); |
2361 | skb->h.raw = skb->nh.raw + sizeof(struct iphdr); | 2361 | skb->transport_header = skb->network_header + sizeof(struct iphdr); |
2362 | skb_put(skb, sizeof(struct iphdr) + sizeof(struct udphdr)); | 2362 | skb_put(skb, sizeof(struct iphdr) + sizeof(struct udphdr)); |
2363 | 2363 | ||
2364 | iph = ip_hdr(skb); | 2364 | iph = ip_hdr(skb); |
@@ -2391,9 +2391,9 @@ static struct sk_buff *fill_packet_ipv4(struct net_device *odev, | |||
2391 | iph->check = 0; | 2391 | iph->check = 0; |
2392 | iph->check = ip_fast_csum((void *)iph, iph->ihl); | 2392 | iph->check = ip_fast_csum((void *)iph, iph->ihl); |
2393 | skb->protocol = protocol; | 2393 | skb->protocol = protocol; |
2394 | skb->mac.raw = (skb->nh.raw - ETH_HLEN - | 2394 | skb->mac_header = (skb->network_header - ETH_HLEN - |
2395 | pkt_dev->nr_labels * sizeof(u32) - | 2395 | pkt_dev->nr_labels * sizeof(u32) - |
2396 | VLAN_TAG_SIZE(pkt_dev) - SVLAN_TAG_SIZE(pkt_dev)); | 2396 | VLAN_TAG_SIZE(pkt_dev) - SVLAN_TAG_SIZE(pkt_dev)); |
2397 | skb->dev = odev; | 2397 | skb->dev = odev; |
2398 | skb->pkt_type = PACKET_HOST; | 2398 | skb->pkt_type = PACKET_HOST; |
2399 | 2399 | ||
@@ -2697,7 +2697,7 @@ static struct sk_buff *fill_packet_ipv6(struct net_device *odev, | |||
2697 | } | 2697 | } |
2698 | 2698 | ||
2699 | skb_set_network_header(skb, skb->tail - skb->data); | 2699 | skb_set_network_header(skb, skb->tail - skb->data); |
2700 | skb->h.raw = skb->nh.raw + sizeof(struct ipv6hdr); | 2700 | skb->transport_header = skb->network_header + sizeof(struct ipv6hdr); |
2701 | skb_put(skb, sizeof(struct ipv6hdr) + sizeof(struct udphdr)); | 2701 | skb_put(skb, sizeof(struct ipv6hdr) + sizeof(struct udphdr)); |
2702 | 2702 | ||
2703 | iph = ipv6_hdr(skb); | 2703 | iph = ipv6_hdr(skb); |
@@ -2738,9 +2738,9 @@ static struct sk_buff *fill_packet_ipv6(struct net_device *odev, | |||
2738 | ipv6_addr_copy(&iph->daddr, &pkt_dev->cur_in6_daddr); | 2738 | ipv6_addr_copy(&iph->daddr, &pkt_dev->cur_in6_daddr); |
2739 | ipv6_addr_copy(&iph->saddr, &pkt_dev->cur_in6_saddr); | 2739 | ipv6_addr_copy(&iph->saddr, &pkt_dev->cur_in6_saddr); |
2740 | 2740 | ||
2741 | skb->mac.raw = (skb->nh.raw - ETH_HLEN - | 2741 | skb->mac_header = (skb->network_header - ETH_HLEN - |
2742 | pkt_dev->nr_labels * sizeof(u32) - | 2742 | pkt_dev->nr_labels * sizeof(u32) - |
2743 | VLAN_TAG_SIZE(pkt_dev) - SVLAN_TAG_SIZE(pkt_dev)); | 2743 | VLAN_TAG_SIZE(pkt_dev) - SVLAN_TAG_SIZE(pkt_dev)); |
2744 | skb->protocol = protocol; | 2744 | skb->protocol = protocol; |
2745 | skb->dev = odev; | 2745 | skb->dev = odev; |
2746 | skb->pkt_type = PACKET_HOST; | 2746 | skb->pkt_type = PACKET_HOST; |
diff --git a/net/core/skbuff.c b/net/core/skbuff.c index f38af6c01b12..1e71764be4a4 100644 --- a/net/core/skbuff.c +++ b/net/core/skbuff.c | |||
@@ -396,9 +396,9 @@ struct sk_buff *skb_clone(struct sk_buff *skb, gfp_t gfp_mask) | |||
396 | n->sk = NULL; | 396 | n->sk = NULL; |
397 | C(tstamp); | 397 | C(tstamp); |
398 | C(dev); | 398 | C(dev); |
399 | C(h); | 399 | C(transport_header); |
400 | C(nh); | 400 | C(network_header); |
401 | C(mac); | 401 | C(mac_header); |
402 | C(dst); | 402 | C(dst); |
403 | dst_clone(skb->dst); | 403 | dst_clone(skb->dst); |
404 | C(sp); | 404 | C(sp); |
@@ -461,9 +461,9 @@ static void copy_skb_header(struct sk_buff *new, const struct sk_buff *old) | |||
461 | #ifdef CONFIG_INET | 461 | #ifdef CONFIG_INET |
462 | new->sp = secpath_get(old->sp); | 462 | new->sp = secpath_get(old->sp); |
463 | #endif | 463 | #endif |
464 | new->h.raw = old->h.raw + offset; | 464 | new->transport_header = old->transport_header + offset; |
465 | new->nh.raw = old->nh.raw + offset; | 465 | new->network_header = old->network_header + offset; |
466 | new->mac.raw = old->mac.raw + offset; | 466 | new->mac_header = old->mac_header + offset; |
467 | memcpy(new->cb, old->cb, sizeof(old->cb)); | 467 | memcpy(new->cb, old->cb, sizeof(old->cb)); |
468 | new->local_df = old->local_df; | 468 | new->local_df = old->local_df; |
469 | new->fclone = SKB_FCLONE_UNAVAILABLE; | 469 | new->fclone = SKB_FCLONE_UNAVAILABLE; |
@@ -639,9 +639,9 @@ int pskb_expand_head(struct sk_buff *skb, int nhead, int ntail, | |||
639 | skb->end = data + size; | 639 | skb->end = data + size; |
640 | skb->data += off; | 640 | skb->data += off; |
641 | skb->tail += off; | 641 | skb->tail += off; |
642 | skb->mac.raw += off; | 642 | skb->transport_header += off; |
643 | skb->h.raw += off; | 643 | skb->network_header += off; |
644 | skb->nh.raw += off; | 644 | skb->mac_header += off; |
645 | skb->cloned = 0; | 645 | skb->cloned = 0; |
646 | skb->nohdr = 0; | 646 | skb->nohdr = 0; |
647 | atomic_set(&skb_shinfo(skb)->dataref, 1); | 647 | atomic_set(&skb_shinfo(skb)->dataref, 1); |
@@ -1906,7 +1906,8 @@ struct sk_buff *skb_segment(struct sk_buff *skb, int features) | |||
1906 | skb_reserve(nskb, headroom); | 1906 | skb_reserve(nskb, headroom); |
1907 | skb_reset_mac_header(nskb); | 1907 | skb_reset_mac_header(nskb); |
1908 | skb_set_network_header(nskb, skb->mac_len); | 1908 | skb_set_network_header(nskb, skb->mac_len); |
1909 | nskb->h.raw = nskb->nh.raw + skb_network_header_len(skb); | 1909 | nskb->transport_header = (nskb->network_header + |
1910 | skb_network_header_len(skb)); | ||
1910 | memcpy(skb_put(nskb, doffset), skb->data, doffset); | 1911 | memcpy(skb_put(nskb, doffset), skb->data, doffset); |
1911 | 1912 | ||
1912 | if (!sg) { | 1913 | if (!sg) { |
diff --git a/net/ieee80211/ieee80211_rx.c b/net/ieee80211/ieee80211_rx.c index 7f5a352800a0..59a765c49cf9 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 += ETH_HLEN; */ | 796 | /* skb2->network_header += ETH_HLEN; */ |
797 | dev_queue_xmit(skb2); | 797 | dev_queue_xmit(skb2); |
798 | } | 798 | } |
799 | #endif | 799 | #endif |
diff --git a/net/ipv4/ah4.c b/net/ipv4/ah4.c index e1bb9e0aa5f3..6da8ff597ad3 100644 --- a/net/ipv4/ah4.c +++ b/net/ipv4/ah4.c | |||
@@ -181,9 +181,9 @@ static int ah_input(struct xfrm_state *x, struct sk_buff *skb) | |||
181 | } | 181 | } |
182 | } | 182 | } |
183 | ((struct iphdr*)work_buf)->protocol = ah->nexthdr; | 183 | ((struct iphdr*)work_buf)->protocol = ah->nexthdr; |
184 | skb->nh.raw += ah_hlen; | 184 | skb->network_header += ah_hlen; |
185 | memcpy(skb_network_header(skb), work_buf, ihl); | 185 | memcpy(skb_network_header(skb), work_buf, ihl); |
186 | skb->h.raw = skb->nh.raw; | 186 | skb->transport_header = skb->network_header; |
187 | __skb_pull(skb, ah_hlen + ihl); | 187 | __skb_pull(skb, ah_hlen + ihl); |
188 | 188 | ||
189 | return 0; | 189 | return 0; |
diff --git a/net/ipv4/igmp.c b/net/ipv4/igmp.c index 4695ada1d9b1..1fc637fb6750 100644 --- a/net/ipv4/igmp.c +++ b/net/ipv4/igmp.c | |||
@@ -333,7 +333,7 @@ static struct sk_buff *igmpv3_newpack(struct net_device *dev, int size) | |||
333 | ((u8*)&pip[1])[2] = 0; | 333 | ((u8*)&pip[1])[2] = 0; |
334 | ((u8*)&pip[1])[3] = 0; | 334 | ((u8*)&pip[1])[3] = 0; |
335 | 335 | ||
336 | skb->h.raw = skb->nh.raw + sizeof(struct iphdr) + 4; | 336 | skb->transport_header = skb->network_header + sizeof(struct iphdr) + 4; |
337 | skb_put(skb, sizeof(*pig)); | 337 | skb_put(skb, sizeof(*pig)); |
338 | pig = igmpv3_report_hdr(skb); | 338 | pig = igmpv3_report_hdr(skb); |
339 | pig->type = IGMPV3_HOST_MEMBERSHIP_REPORT; | 339 | pig->type = IGMPV3_HOST_MEMBERSHIP_REPORT; |
diff --git a/net/ipv4/ip_gre.c b/net/ipv4/ip_gre.c index e6a9e452fd61..f49afaa81298 100644 --- a/net/ipv4/ip_gre.c +++ b/net/ipv4/ip_gre.c | |||
@@ -828,7 +828,7 @@ static int ipgre_tunnel_xmit(struct sk_buff *skb, struct net_device *dev) | |||
828 | old_iph = ip_hdr(skb); | 828 | old_iph = ip_hdr(skb); |
829 | } | 829 | } |
830 | 830 | ||
831 | skb->h.raw = skb->nh.raw; | 831 | skb->transport_header = skb->network_header; |
832 | skb_push(skb, gre_hlen); | 832 | skb_push(skb, gre_hlen); |
833 | skb_reset_network_header(skb); | 833 | skb_reset_network_header(skb); |
834 | memset(&(IPCB(skb)->opt), 0, sizeof(IPCB(skb)->opt)); | 834 | memset(&(IPCB(skb)->opt), 0, sizeof(IPCB(skb)->opt)); |
diff --git a/net/ipv4/ip_output.c b/net/ipv4/ip_output.c index 02988fb262d6..875da382d9b9 100644 --- a/net/ipv4/ip_output.c +++ b/net/ipv4/ip_output.c | |||
@@ -582,7 +582,7 @@ slow_path: | |||
582 | skb_reserve(skb2, ll_rs); | 582 | skb_reserve(skb2, ll_rs); |
583 | skb_put(skb2, len + hlen); | 583 | skb_put(skb2, len + hlen); |
584 | skb_reset_network_header(skb2); | 584 | skb_reset_network_header(skb2); |
585 | skb2->h.raw = skb2->nh.raw + hlen; | 585 | skb2->transport_header = skb2->network_header + hlen; |
586 | 586 | ||
587 | /* | 587 | /* |
588 | * Charge the memory for the fragment to any owner | 588 | * Charge the memory for the fragment to any owner |
@@ -713,7 +713,7 @@ static inline int ip_ufo_append_data(struct sock *sk, | |||
713 | skb_reset_network_header(skb); | 713 | skb_reset_network_header(skb); |
714 | 714 | ||
715 | /* initialize protocol header pointer */ | 715 | /* initialize protocol header pointer */ |
716 | skb->h.raw = skb->nh.raw + fragheaderlen; | 716 | skb->transport_header = skb->network_header + fragheaderlen; |
717 | 717 | ||
718 | skb->ip_summed = CHECKSUM_PARTIAL; | 718 | skb->ip_summed = CHECKSUM_PARTIAL; |
719 | skb->csum = 0; | 719 | skb->csum = 0; |
@@ -918,7 +918,8 @@ alloc_new_skb: | |||
918 | */ | 918 | */ |
919 | data = skb_put(skb, fraglen); | 919 | data = skb_put(skb, fraglen); |
920 | skb_set_network_header(skb, exthdrlen); | 920 | skb_set_network_header(skb, exthdrlen); |
921 | skb->h.raw = skb->nh.raw + fragheaderlen; | 921 | skb->transport_header = (skb->network_header + |
922 | fragheaderlen); | ||
922 | data += fragheaderlen; | 923 | data += fragheaderlen; |
923 | 924 | ||
924 | if (fraggap) { | 925 | if (fraggap) { |
@@ -1112,8 +1113,8 @@ ssize_t ip_append_page(struct sock *sk, struct page *page, | |||
1112 | */ | 1113 | */ |
1113 | skb_put(skb, fragheaderlen + fraggap); | 1114 | skb_put(skb, fragheaderlen + fraggap); |
1114 | skb_reset_network_header(skb); | 1115 | skb_reset_network_header(skb); |
1115 | skb->h.raw = skb->nh.raw + fragheaderlen; | 1116 | skb->transport_header = (skb->network_header + |
1116 | 1117 | fragheaderlen); | |
1117 | if (fraggap) { | 1118 | if (fraggap) { |
1118 | skb->csum = skb_copy_and_csum_bits(skb_prev, | 1119 | skb->csum = skb_copy_and_csum_bits(skb_prev, |
1119 | maxfraglen, | 1120 | maxfraglen, |
diff --git a/net/ipv4/ipcomp.c b/net/ipv4/ipcomp.c index 1f13cc507a47..ba348b1e5f84 100644 --- a/net/ipv4/ipcomp.c +++ b/net/ipv4/ipcomp.c | |||
@@ -87,7 +87,7 @@ static int ipcomp_input(struct xfrm_state *x, struct sk_buff *skb) | |||
87 | iph = ip_hdr(skb); | 87 | iph = ip_hdr(skb); |
88 | ipch = (void *)skb->data; | 88 | ipch = (void *)skb->data; |
89 | iph->protocol = ipch->nexthdr; | 89 | iph->protocol = ipch->nexthdr; |
90 | skb->h.raw = skb->nh.raw + sizeof(*ipch); | 90 | skb->transport_header = skb->network_header + sizeof(*ipch); |
91 | __skb_pull(skb, sizeof(*ipch)); | 91 | __skb_pull(skb, sizeof(*ipch)); |
92 | err = ipcomp_decompress(x, skb); | 92 | err = ipcomp_decompress(x, skb); |
93 | 93 | ||
diff --git a/net/ipv4/ipip.c b/net/ipv4/ipip.c index b32b50114806..37ab39170175 100644 --- a/net/ipv4/ipip.c +++ b/net/ipv4/ipip.c | |||
@@ -485,7 +485,7 @@ static int ipip_rcv(struct sk_buff *skb) | |||
485 | 485 | ||
486 | secpath_reset(skb); | 486 | secpath_reset(skb); |
487 | 487 | ||
488 | skb->mac.raw = skb->nh.raw; | 488 | skb->mac_header = skb->network_header; |
489 | skb_reset_network_header(skb); | 489 | skb_reset_network_header(skb); |
490 | skb->protocol = htons(ETH_P_IP); | 490 | skb->protocol = htons(ETH_P_IP); |
491 | skb->pkt_type = PACKET_HOST; | 491 | skb->pkt_type = PACKET_HOST; |
@@ -617,7 +617,7 @@ static int ipip_tunnel_xmit(struct sk_buff *skb, struct net_device *dev) | |||
617 | old_iph = ip_hdr(skb); | 617 | old_iph = ip_hdr(skb); |
618 | } | 618 | } |
619 | 619 | ||
620 | skb->h.raw = skb->nh.raw; | 620 | skb->transport_header = skb->network_header; |
621 | skb_push(skb, sizeof(struct iphdr)); | 621 | skb_push(skb, sizeof(struct iphdr)); |
622 | skb_reset_network_header(skb); | 622 | skb_reset_network_header(skb); |
623 | memset(&(IPCB(skb)->opt), 0, sizeof(IPCB(skb)->opt)); | 623 | memset(&(IPCB(skb)->opt), 0, sizeof(IPCB(skb)->opt)); |
diff --git a/net/ipv4/ipmr.c b/net/ipv4/ipmr.c index 357894259f8f..50d0b301380e 100644 --- a/net/ipv4/ipmr.c +++ b/net/ipv4/ipmr.c | |||
@@ -597,7 +597,7 @@ static int ipmr_cache_report(struct sk_buff *pkt, vifi_t vifi, int assert) | |||
597 | msg->im_msgtype = assert; | 597 | msg->im_msgtype = assert; |
598 | igmp->code = 0; | 598 | igmp->code = 0; |
599 | ip_hdr(skb)->tot_len = htons(skb->len); /* Fix the length */ | 599 | ip_hdr(skb)->tot_len = htons(skb->len); /* Fix the length */ |
600 | skb->h.raw = skb->nh.raw; | 600 | skb->transport_header = skb->network_header; |
601 | } | 601 | } |
602 | 602 | ||
603 | if (mroute_socket == NULL) { | 603 | if (mroute_socket == NULL) { |
@@ -1102,7 +1102,7 @@ static void ip_encap(struct sk_buff *skb, __be32 saddr, __be32 daddr) | |||
1102 | struct iphdr *old_iph = ip_hdr(skb); | 1102 | struct iphdr *old_iph = ip_hdr(skb); |
1103 | 1103 | ||
1104 | skb_push(skb, sizeof(struct iphdr)); | 1104 | skb_push(skb, sizeof(struct iphdr)); |
1105 | skb->h.raw = skb->nh.raw; | 1105 | skb->transport_header = skb->network_header; |
1106 | skb_reset_network_header(skb); | 1106 | skb_reset_network_header(skb); |
1107 | iph = ip_hdr(skb); | 1107 | iph = ip_hdr(skb); |
1108 | 1108 | ||
@@ -1461,7 +1461,7 @@ int pim_rcv_v1(struct sk_buff * skb) | |||
1461 | if (reg_dev == NULL) | 1461 | if (reg_dev == NULL) |
1462 | goto drop; | 1462 | goto drop; |
1463 | 1463 | ||
1464 | skb->mac.raw = skb->nh.raw; | 1464 | skb->mac_header = skb->network_header; |
1465 | skb_pull(skb, (u8*)encap - skb->data); | 1465 | skb_pull(skb, (u8*)encap - skb->data); |
1466 | skb_reset_network_header(skb); | 1466 | skb_reset_network_header(skb); |
1467 | skb->dev = reg_dev; | 1467 | skb->dev = reg_dev; |
@@ -1517,7 +1517,7 @@ static int pim_rcv(struct sk_buff * skb) | |||
1517 | if (reg_dev == NULL) | 1517 | if (reg_dev == NULL) |
1518 | goto drop; | 1518 | goto drop; |
1519 | 1519 | ||
1520 | skb->mac.raw = skb->nh.raw; | 1520 | skb->mac_header = skb->network_header; |
1521 | skb_pull(skb, (u8*)encap - skb->data); | 1521 | skb_pull(skb, (u8*)encap - skb->data); |
1522 | skb_reset_network_header(skb); | 1522 | skb_reset_network_header(skb); |
1523 | skb->dev = reg_dev; | 1523 | skb->dev = reg_dev; |
diff --git a/net/ipv4/ipvs/ip_vs_xmit.c b/net/ipv4/ipvs/ip_vs_xmit.c index c6276d08b31e..fded9b2f227c 100644 --- a/net/ipv4/ipvs/ip_vs_xmit.c +++ b/net/ipv4/ipvs/ip_vs_xmit.c | |||
@@ -323,7 +323,7 @@ ip_vs_tunnel_xmit(struct sk_buff *skb, struct ip_vs_conn *cp, | |||
323 | struct iphdr *old_iph = ip_hdr(skb); | 323 | struct iphdr *old_iph = ip_hdr(skb); |
324 | u8 tos = old_iph->tos; | 324 | u8 tos = old_iph->tos; |
325 | __be16 df = old_iph->frag_off; | 325 | __be16 df = old_iph->frag_off; |
326 | unsigned char *old_h = skb_transport_header(skb); | 326 | unsigned char *old_transport_header = skb->transport_header; |
327 | struct iphdr *iph; /* Our new IP header */ | 327 | struct iphdr *iph; /* Our new IP header */ |
328 | int max_headroom; /* The extra header space needed */ | 328 | int max_headroom; /* The extra header space needed */ |
329 | int mtu; | 329 | int mtu; |
@@ -381,7 +381,7 @@ ip_vs_tunnel_xmit(struct sk_buff *skb, struct ip_vs_conn *cp, | |||
381 | old_iph = ip_hdr(skb); | 381 | old_iph = ip_hdr(skb); |
382 | } | 382 | } |
383 | 383 | ||
384 | skb->h.raw = old_h; | 384 | skb->transport_header = old_transport_header; |
385 | 385 | ||
386 | /* fix old IP header checksum */ | 386 | /* fix old IP header checksum */ |
387 | ip_send_check(old_iph); | 387 | ip_send_check(old_iph); |
diff --git a/net/ipv4/netfilter/ipt_LOG.c b/net/ipv4/netfilter/ipt_LOG.c index c697971fe317..2fa36618c517 100644 --- a/net/ipv4/netfilter/ipt_LOG.c +++ b/net/ipv4/netfilter/ipt_LOG.c | |||
@@ -399,7 +399,7 @@ ipt_log_packet(unsigned int pf, | |||
399 | /* MAC logging for input chain only. */ | 399 | /* MAC logging for input chain only. */ |
400 | printk("MAC="); | 400 | printk("MAC="); |
401 | if (skb->dev && skb->dev->hard_header_len | 401 | if (skb->dev && skb->dev->hard_header_len |
402 | && skb->mac.raw != skb->nh.raw) { | 402 | && skb->mac_header != skb->network_header) { |
403 | int i; | 403 | int i; |
404 | const unsigned char *p = skb_mac_header(skb); | 404 | const unsigned char *p = skb_mac_header(skb); |
405 | for (i = 0; i < skb->dev->hard_header_len; i++,p++) | 405 | for (i = 0; i < skb->dev->hard_header_len; i++,p++) |
diff --git a/net/ipv4/netfilter/ipt_ULOG.c b/net/ipv4/netfilter/ipt_ULOG.c index fae2a34d23d0..ace711e2b05a 100644 --- a/net/ipv4/netfilter/ipt_ULOG.c +++ b/net/ipv4/netfilter/ipt_ULOG.c | |||
@@ -251,7 +251,7 @@ static void ipt_ulog_packet(unsigned int hooknum, | |||
251 | *(pm->prefix) = '\0'; | 251 | *(pm->prefix) = '\0'; |
252 | 252 | ||
253 | if (in && in->hard_header_len > 0 | 253 | if (in && in->hard_header_len > 0 |
254 | && skb->mac.raw != skb->nh.raw | 254 | && skb->mac_header != skb->network_header |
255 | && in->hard_header_len <= ULOG_MAC_LEN) { | 255 | && in->hard_header_len <= ULOG_MAC_LEN) { |
256 | memcpy(pm->mac, skb_mac_header(skb), in->hard_header_len); | 256 | memcpy(pm->mac, skb_mac_header(skb), in->hard_header_len); |
257 | pm->mac_len = in->hard_header_len; | 257 | pm->mac_len = in->hard_header_len; |
diff --git a/net/ipv4/raw.c b/net/ipv4/raw.c index bf101dc1a972..24d7c9f31918 100644 --- a/net/ipv4/raw.c +++ b/net/ipv4/raw.c | |||
@@ -297,7 +297,7 @@ static int raw_send_hdrinc(struct sock *sk, void *from, size_t length, | |||
297 | 297 | ||
298 | skb->ip_summed = CHECKSUM_NONE; | 298 | skb->ip_summed = CHECKSUM_NONE; |
299 | 299 | ||
300 | skb->h.raw = skb->nh.raw; | 300 | skb->transport_header = skb->network_header; |
301 | err = memcpy_fromiovecend((void *)iph, from, 0, length); | 301 | err = memcpy_fromiovecend((void *)iph, from, 0, length); |
302 | if (err) | 302 | if (err) |
303 | goto error_fault; | 303 | goto error_fault; |
diff --git a/net/ipv4/xfrm4_mode_beet.c b/net/ipv4/xfrm4_mode_beet.c index 74859dfb3a25..3650e027ce70 100644 --- a/net/ipv4/xfrm4_mode_beet.c +++ b/net/ipv4/xfrm4_mode_beet.c | |||
@@ -33,7 +33,7 @@ static int xfrm4_beet_output(struct xfrm_state *x, struct sk_buff *skb) | |||
33 | int hdrlen, optlen; | 33 | int hdrlen, optlen; |
34 | 34 | ||
35 | iph = ip_hdr(skb); | 35 | iph = ip_hdr(skb); |
36 | skb->h.raw = skb->nh.raw; | 36 | skb->transport_header = skb->network_header; |
37 | 37 | ||
38 | hdrlen = 0; | 38 | hdrlen = 0; |
39 | optlen = iph->ihl * 4 - sizeof(*iph); | 39 | optlen = iph->ihl * 4 - sizeof(*iph); |
@@ -43,7 +43,7 @@ static int xfrm4_beet_output(struct xfrm_state *x, struct sk_buff *skb) | |||
43 | skb_push(skb, x->props.header_len + hdrlen); | 43 | skb_push(skb, x->props.header_len + hdrlen); |
44 | skb_reset_network_header(skb); | 44 | skb_reset_network_header(skb); |
45 | top_iph = ip_hdr(skb); | 45 | top_iph = ip_hdr(skb); |
46 | skb->h.raw += sizeof(*iph) - hdrlen; | 46 | skb->transport_header += sizeof(*iph) - hdrlen; |
47 | 47 | ||
48 | memmove(top_iph, iph, sizeof(*iph)); | 48 | memmove(top_iph, iph, sizeof(*iph)); |
49 | if (unlikely(optlen)) { | 49 | if (unlikely(optlen)) { |
diff --git a/net/ipv4/xfrm4_mode_transport.c b/net/ipv4/xfrm4_mode_transport.c index dc8834ea3754..601047161ea6 100644 --- a/net/ipv4/xfrm4_mode_transport.c +++ b/net/ipv4/xfrm4_mode_transport.c | |||
@@ -26,9 +26,7 @@ static int xfrm4_transport_output(struct xfrm_state *x, struct sk_buff *skb) | |||
26 | struct iphdr *iph = ip_hdr(skb); | 26 | struct iphdr *iph = ip_hdr(skb); |
27 | int ihl = iph->ihl * 4; | 27 | int ihl = iph->ihl * 4; |
28 | 28 | ||
29 | skb->h.raw = skb->nh.raw; | 29 | skb->transport_header = skb->network_header + ihl; |
30 | skb->h.raw += ihl; | ||
31 | |||
32 | skb_push(skb, x->props.header_len); | 30 | skb_push(skb, x->props.header_len); |
33 | skb_reset_network_header(skb); | 31 | skb_reset_network_header(skb); |
34 | memmove(skb_network_header(skb), iph, ihl); | 32 | memmove(skb_network_header(skb), iph, ihl); |
@@ -47,10 +45,10 @@ static int xfrm4_transport_input(struct xfrm_state *x, struct sk_buff *skb) | |||
47 | { | 45 | { |
48 | int ihl = skb->data - skb_transport_header(skb); | 46 | int ihl = skb->data - skb_transport_header(skb); |
49 | 47 | ||
50 | if (skb->h.raw != skb->nh.raw) { | 48 | if (skb->transport_header != skb->network_header) { |
51 | memmove(skb_transport_header(skb), | 49 | memmove(skb_transport_header(skb), |
52 | skb_network_header(skb), ihl); | 50 | skb_network_header(skb), ihl); |
53 | skb->nh.raw = skb->h.raw; | 51 | skb->network_header = skb->transport_header; |
54 | } | 52 | } |
55 | ip_hdr(skb)->tot_len = htons(skb->len + ihl); | 53 | ip_hdr(skb)->tot_len = htons(skb->len + ihl); |
56 | skb_reset_transport_header(skb); | 54 | skb_reset_transport_header(skb); |
diff --git a/net/ipv4/xfrm4_mode_tunnel.c b/net/ipv4/xfrm4_mode_tunnel.c index 521e52f055c1..a2f2e6a5ec5d 100644 --- a/net/ipv4/xfrm4_mode_tunnel.c +++ b/net/ipv4/xfrm4_mode_tunnel.c | |||
@@ -47,7 +47,7 @@ static int xfrm4_tunnel_output(struct xfrm_state *x, struct sk_buff *skb) | |||
47 | int flags; | 47 | int flags; |
48 | 48 | ||
49 | iph = ip_hdr(skb); | 49 | iph = ip_hdr(skb); |
50 | skb->h.raw = skb->nh.raw; | 50 | skb->transport_header = skb->network_header; |
51 | 51 | ||
52 | skb_push(skb, x->props.header_len); | 52 | skb_push(skb, x->props.header_len); |
53 | skb_reset_network_header(skb); | 53 | skb_reset_network_header(skb); |
diff --git a/net/ipv6/ah6.c b/net/ipv6/ah6.c index d2af4fe3725b..b696c8401200 100644 --- a/net/ipv6/ah6.c +++ b/net/ipv6/ah6.c | |||
@@ -316,8 +316,8 @@ static int ah6_input(struct xfrm_state *x, struct sk_buff *skb) | |||
316 | * | 316 | * |
317 | * To erase AH: | 317 | * To erase AH: |
318 | * Keeping copy of cleared headers. After AH processing, | 318 | * Keeping copy of cleared headers. After AH processing, |
319 | * Moving the pointer of skb->nh.raw by using skb_pull as long as AH | 319 | * Moving the pointer of skb->network_header by using skb_pull as long |
320 | * header length. Then copy back the copy as long as hdr_len | 320 | * as AH header length. Then copy back the copy as long as hdr_len |
321 | * If destination header following AH exists, copy it into after [Ext2]. | 321 | * If destination header following AH exists, copy it into after [Ext2]. |
322 | * | 322 | * |
323 | * |<>|[IPv6][Ext1][Ext2][Dest][Payload] | 323 | * |<>|[IPv6][Ext1][Ext2][Dest][Payload] |
@@ -384,9 +384,9 @@ static int ah6_input(struct xfrm_state *x, struct sk_buff *skb) | |||
384 | } | 384 | } |
385 | } | 385 | } |
386 | 386 | ||
387 | skb->nh.raw += ah_hlen; | 387 | skb->network_header += ah_hlen; |
388 | memcpy(skb_network_header(skb), tmp_hdr, hdr_len); | 388 | memcpy(skb_network_header(skb), tmp_hdr, hdr_len); |
389 | skb->h.raw = skb->nh.raw; | 389 | skb->transport_header = skb->network_header; |
390 | __skb_pull(skb, ah_hlen + hdr_len); | 390 | __skb_pull(skb, ah_hlen + hdr_len); |
391 | 391 | ||
392 | kfree(tmp_hdr); | 392 | kfree(tmp_hdr); |
diff --git a/net/ipv6/exthdrs.c b/net/ipv6/exthdrs.c index f34cc2bd489a..a6a275db88cd 100644 --- a/net/ipv6/exthdrs.c +++ b/net/ipv6/exthdrs.c | |||
@@ -306,7 +306,7 @@ static int ipv6_destopt_rcv(struct sk_buff **skbp) | |||
306 | if (ip6_parse_tlv(tlvprocdestopt_lst, skbp)) { | 306 | if (ip6_parse_tlv(tlvprocdestopt_lst, skbp)) { |
307 | dst_release(dst); | 307 | dst_release(dst); |
308 | skb = *skbp; | 308 | skb = *skbp; |
309 | skb->h.raw += (skb_transport_header(skb)[1] + 1) << 3; | 309 | skb->transport_header += (skb_transport_header(skb)[1] + 1) << 3; |
310 | opt = IP6CB(skb); | 310 | opt = IP6CB(skb); |
311 | #ifdef CONFIG_IPV6_MIP6 | 311 | #ifdef CONFIG_IPV6_MIP6 |
312 | opt->nhoff = dstbuf; | 312 | opt->nhoff = dstbuf; |
@@ -444,7 +444,7 @@ looped_back: | |||
444 | } | 444 | } |
445 | 445 | ||
446 | opt->lastopt = opt->srcrt = skb_network_header_len(skb); | 446 | opt->lastopt = opt->srcrt = skb_network_header_len(skb); |
447 | skb->h.raw += (hdr->hdrlen + 1) << 3; | 447 | skb->transport_header += (hdr->hdrlen + 1) << 3; |
448 | opt->dst0 = opt->dst1; | 448 | opt->dst0 = opt->dst1; |
449 | opt->dst1 = 0; | 449 | opt->dst1 = 0; |
450 | opt->nhoff = (&hdr->nexthdr) - skb_network_header(skb); | 450 | opt->nhoff = (&hdr->nexthdr) - skb_network_header(skb); |
@@ -752,7 +752,7 @@ int ipv6_parse_hopopts(struct sk_buff **skbp) | |||
752 | opt->hop = sizeof(struct ipv6hdr); | 752 | opt->hop = sizeof(struct ipv6hdr); |
753 | if (ip6_parse_tlv(tlvprochopopt_lst, skbp)) { | 753 | if (ip6_parse_tlv(tlvprochopopt_lst, skbp)) { |
754 | skb = *skbp; | 754 | skb = *skbp; |
755 | skb->h.raw += (skb_transport_header(skb)[1] + 1) << 3; | 755 | skb->transport_header += (skb_transport_header(skb)[1] + 1) << 3; |
756 | opt = IP6CB(skb); | 756 | opt = IP6CB(skb); |
757 | opt->nhoff = sizeof(struct ipv6hdr); | 757 | opt->nhoff = sizeof(struct ipv6hdr); |
758 | return 1; | 758 | return 1; |
diff --git a/net/ipv6/ip6_input.c b/net/ipv6/ip6_input.c index cf0c4406b59e..be0ee8a34f9b 100644 --- a/net/ipv6/ip6_input.c +++ b/net/ipv6/ip6_input.c | |||
@@ -101,7 +101,7 @@ int ipv6_rcv(struct sk_buff *skb, struct net_device *dev, struct packet_type *pt | |||
101 | if (hdr->version != 6) | 101 | if (hdr->version != 6) |
102 | goto err; | 102 | goto err; |
103 | 103 | ||
104 | skb->h.raw = skb->nh.raw + sizeof(*hdr); | 104 | skb->transport_header = skb->network_header + sizeof(*hdr); |
105 | IP6CB(skb)->nhoff = offsetof(struct ipv6hdr, nexthdr); | 105 | IP6CB(skb)->nhoff = offsetof(struct ipv6hdr, nexthdr); |
106 | 106 | ||
107 | pkt_len = ntohs(hdr->payload_len); | 107 | pkt_len = ntohs(hdr->payload_len); |
diff --git a/net/ipv6/ip6_output.c b/net/ipv6/ip6_output.c index 57a326080757..b2c092c6b9dc 100644 --- a/net/ipv6/ip6_output.c +++ b/net/ipv6/ip6_output.c | |||
@@ -733,7 +733,8 @@ slow_path: | |||
733 | skb_put(frag, len + hlen + sizeof(struct frag_hdr)); | 733 | skb_put(frag, len + hlen + sizeof(struct frag_hdr)); |
734 | skb_reset_network_header(frag); | 734 | skb_reset_network_header(frag); |
735 | fh = (struct frag_hdr *)(skb_network_header(frag) + hlen); | 735 | fh = (struct frag_hdr *)(skb_network_header(frag) + hlen); |
736 | frag->h.raw = frag->nh.raw + hlen + sizeof(struct frag_hdr); | 736 | frag->transport_header = (frag->network_header + hlen + |
737 | sizeof(struct frag_hdr)); | ||
737 | 738 | ||
738 | /* | 739 | /* |
739 | * Charge the memory for the fragment to any owner | 740 | * Charge the memory for the fragment to any owner |
@@ -761,7 +762,7 @@ slow_path: | |||
761 | /* | 762 | /* |
762 | * Copy a block of the IP datagram. | 763 | * Copy a block of the IP datagram. |
763 | */ | 764 | */ |
764 | if (skb_copy_bits(skb, ptr, frag->h.raw, len)) | 765 | if (skb_copy_bits(skb, ptr, skb_transport_header(skb), len)) |
765 | BUG(); | 766 | BUG(); |
766 | left -= len; | 767 | left -= len; |
767 | 768 | ||
@@ -976,7 +977,7 @@ static inline int ip6_ufo_append_data(struct sock *sk, | |||
976 | skb_reset_network_header(skb); | 977 | skb_reset_network_header(skb); |
977 | 978 | ||
978 | /* initialize protocol header pointer */ | 979 | /* initialize protocol header pointer */ |
979 | skb->h.raw = skb->nh.raw + fragheaderlen; | 980 | skb->transport_header = skb->network_header + fragheaderlen; |
980 | 981 | ||
981 | skb->ip_summed = CHECKSUM_PARTIAL; | 982 | skb->ip_summed = CHECKSUM_PARTIAL; |
982 | skb->csum = 0; | 983 | skb->csum = 0; |
@@ -1198,8 +1199,8 @@ alloc_new_skb: | |||
1198 | data = skb_put(skb, fraglen); | 1199 | data = skb_put(skb, fraglen); |
1199 | skb_set_network_header(skb, exthdrlen); | 1200 | skb_set_network_header(skb, exthdrlen); |
1200 | data += fragheaderlen; | 1201 | data += fragheaderlen; |
1201 | skb->h.raw = skb->nh.raw + fragheaderlen; | 1202 | skb->transport_header = (skb->network_header + |
1202 | 1203 | fragheaderlen); | |
1203 | if (fraggap) { | 1204 | if (fraggap) { |
1204 | skb->csum = skb_copy_and_csum_bits( | 1205 | skb->csum = skb_copy_and_csum_bits( |
1205 | skb_prev, maxfraglen, | 1206 | skb_prev, maxfraglen, |
diff --git a/net/ipv6/ip6_tunnel.c b/net/ipv6/ip6_tunnel.c index 05b59a77bc69..a0902fbdb4e1 100644 --- a/net/ipv6/ip6_tunnel.c +++ b/net/ipv6/ip6_tunnel.c | |||
@@ -701,7 +701,7 @@ static int ip6_tnl_rcv(struct sk_buff *skb, __u16 protocol, | |||
701 | goto discard; | 701 | goto discard; |
702 | } | 702 | } |
703 | secpath_reset(skb); | 703 | secpath_reset(skb); |
704 | skb->mac.raw = skb->nh.raw; | 704 | skb->mac_header = skb->network_header; |
705 | skb_reset_network_header(skb); | 705 | skb_reset_network_header(skb); |
706 | skb->protocol = htons(protocol); | 706 | skb->protocol = htons(protocol); |
707 | skb->pkt_type = PACKET_HOST; | 707 | skb->pkt_type = PACKET_HOST; |
@@ -898,7 +898,7 @@ static int ip6_tnl_xmit2(struct sk_buff *skb, | |||
898 | dst_release(skb->dst); | 898 | dst_release(skb->dst); |
899 | skb->dst = dst_clone(dst); | 899 | skb->dst = dst_clone(dst); |
900 | 900 | ||
901 | skb->h.raw = skb->nh.raw; | 901 | skb->transport_header = skb->network_header; |
902 | 902 | ||
903 | proto = fl->proto; | 903 | proto = fl->proto; |
904 | if (encap_limit >= 0) { | 904 | if (encap_limit >= 0) { |
diff --git a/net/ipv6/ipcomp6.c b/net/ipv6/ipcomp6.c index 5555c98dea03..7691a1b5caac 100644 --- a/net/ipv6/ipcomp6.c +++ b/net/ipv6/ipcomp6.c | |||
@@ -81,7 +81,7 @@ static int ipcomp6_input(struct xfrm_state *x, struct sk_buff *skb) | |||
81 | /* Remove ipcomp header and decompress original payload */ | 81 | /* Remove ipcomp header and decompress original payload */ |
82 | iph = ipv6_hdr(skb); | 82 | iph = ipv6_hdr(skb); |
83 | ipch = (void *)skb->data; | 83 | ipch = (void *)skb->data; |
84 | skb->h.raw = skb->nh.raw + sizeof(*ipch); | 84 | skb->transport_header = skb->network_header + sizeof(*ipch); |
85 | __skb_pull(skb, sizeof(*ipch)); | 85 | __skb_pull(skb, sizeof(*ipch)); |
86 | 86 | ||
87 | /* decompression */ | 87 | /* decompression */ |
diff --git a/net/ipv6/netfilter/ip6t_LOG.c b/net/ipv6/netfilter/ip6t_LOG.c index 54d176187f3f..b465e24e90b3 100644 --- a/net/ipv6/netfilter/ip6t_LOG.c +++ b/net/ipv6/netfilter/ip6t_LOG.c | |||
@@ -396,7 +396,7 @@ ip6t_log_packet(unsigned int pf, | |||
396 | /* MAC logging for input chain only. */ | 396 | /* MAC logging for input chain only. */ |
397 | printk("MAC="); | 397 | printk("MAC="); |
398 | if (skb->dev && (len = skb->dev->hard_header_len) && | 398 | if (skb->dev && (len = skb->dev->hard_header_len) && |
399 | skb->mac.raw != skb->nh.raw) { | 399 | skb->mac_header != skb->network_header) { |
400 | const unsigned char *p = skb_mac_header(skb); | 400 | const unsigned char *p = skb_mac_header(skb); |
401 | int i; | 401 | int i; |
402 | 402 | ||
diff --git a/net/ipv6/netfilter/nf_conntrack_reasm.c b/net/ipv6/netfilter/nf_conntrack_reasm.c index 490e7e151f2d..b7889ceef556 100644 --- a/net/ipv6/netfilter/nf_conntrack_reasm.c +++ b/net/ipv6/netfilter/nf_conntrack_reasm.c | |||
@@ -630,8 +630,8 @@ nf_ct_frag6_reasm(struct nf_ct_frag6_queue *fq, struct net_device *dev) | |||
630 | skb_network_header(head)[fq->nhoffset] = skb_transport_header(head)[0]; | 630 | skb_network_header(head)[fq->nhoffset] = skb_transport_header(head)[0]; |
631 | memmove(head->head + sizeof(struct frag_hdr), head->head, | 631 | memmove(head->head + sizeof(struct frag_hdr), head->head, |
632 | (head->data - head->head) - sizeof(struct frag_hdr)); | 632 | (head->data - head->head) - sizeof(struct frag_hdr)); |
633 | head->mac.raw += sizeof(struct frag_hdr); | 633 | head->mac_header += sizeof(struct frag_hdr); |
634 | head->nh.raw += sizeof(struct frag_hdr); | 634 | head->network_header += sizeof(struct frag_hdr); |
635 | 635 | ||
636 | skb_shinfo(head)->frag_list = head->next; | 636 | skb_shinfo(head)->frag_list = head->next; |
637 | skb_reset_transport_header(head); | 637 | skb_reset_transport_header(head); |
diff --git a/net/ipv6/raw.c b/net/ipv6/raw.c index f925ca7c1a50..8705f6a502d9 100644 --- a/net/ipv6/raw.c +++ b/net/ipv6/raw.c | |||
@@ -583,7 +583,7 @@ static int rawv6_send_hdrinc(struct sock *sk, void *from, int length, | |||
583 | 583 | ||
584 | skb->ip_summed = CHECKSUM_NONE; | 584 | skb->ip_summed = CHECKSUM_NONE; |
585 | 585 | ||
586 | skb->h.raw = skb->nh.raw; | 586 | skb->transport_header = skb->network_header; |
587 | err = memcpy_fromiovecend((void *)iph, from, 0, length); | 587 | err = memcpy_fromiovecend((void *)iph, from, 0, length); |
588 | if (err) | 588 | if (err) |
589 | goto error_fault; | 589 | goto error_fault; |
diff --git a/net/ipv6/reassembly.c b/net/ipv6/reassembly.c index 6dfacfa7a599..de795c04e34c 100644 --- a/net/ipv6/reassembly.c +++ b/net/ipv6/reassembly.c | |||
@@ -646,11 +646,11 @@ static int ip6_frag_reasm(struct frag_queue *fq, struct sk_buff **skb_in, | |||
646 | /* We have to remove fragment header from datagram and to relocate | 646 | /* We have to remove fragment header from datagram and to relocate |
647 | * header in order to calculate ICV correctly. */ | 647 | * header in order to calculate ICV correctly. */ |
648 | nhoff = fq->nhoffset; | 648 | nhoff = fq->nhoffset; |
649 | skb_network_header(head)[nhoff] = head->h.raw[0]; | 649 | skb_network_header(head)[nhoff] = skb_transport_header(head)[0]; |
650 | memmove(head->head + sizeof(struct frag_hdr), head->head, | 650 | memmove(head->head + sizeof(struct frag_hdr), head->head, |
651 | (head->data - head->head) - sizeof(struct frag_hdr)); | 651 | (head->data - head->head) - sizeof(struct frag_hdr)); |
652 | head->mac.raw += sizeof(struct frag_hdr); | 652 | head->mac_header += sizeof(struct frag_hdr); |
653 | head->nh.raw += sizeof(struct frag_hdr); | 653 | head->network_header += sizeof(struct frag_hdr); |
654 | 654 | ||
655 | skb_shinfo(head)->frag_list = head->next; | 655 | skb_shinfo(head)->frag_list = head->next; |
656 | skb_reset_transport_header(head); | 656 | skb_reset_transport_header(head); |
@@ -732,7 +732,7 @@ static int ipv6_frag_rcv(struct sk_buff **skbp) | |||
732 | 732 | ||
733 | if (!(fhdr->frag_off & htons(0xFFF9))) { | 733 | if (!(fhdr->frag_off & htons(0xFFF9))) { |
734 | /* It is not a fragmented frame */ | 734 | /* It is not a fragmented frame */ |
735 | skb->h.raw += sizeof(struct frag_hdr); | 735 | skb->transport_header += sizeof(struct frag_hdr); |
736 | IP6_INC_STATS_BH(ip6_dst_idev(skb->dst), IPSTATS_MIB_REASMOKS); | 736 | IP6_INC_STATS_BH(ip6_dst_idev(skb->dst), IPSTATS_MIB_REASMOKS); |
737 | 737 | ||
738 | IP6CB(skb)->nhoff = (u8 *)fhdr - skb_network_header(skb); | 738 | IP6CB(skb)->nhoff = (u8 *)fhdr - skb_network_header(skb); |
diff --git a/net/ipv6/sit.c b/net/ipv6/sit.c index 1e8827b90aa7..27fe10ffacb0 100644 --- a/net/ipv6/sit.c +++ b/net/ipv6/sit.c | |||
@@ -382,7 +382,7 @@ static int ipip6_rcv(struct sk_buff *skb) | |||
382 | read_lock(&ipip6_lock); | 382 | read_lock(&ipip6_lock); |
383 | if ((tunnel = ipip6_tunnel_lookup(iph->saddr, iph->daddr)) != NULL) { | 383 | if ((tunnel = ipip6_tunnel_lookup(iph->saddr, iph->daddr)) != NULL) { |
384 | secpath_reset(skb); | 384 | secpath_reset(skb); |
385 | skb->mac.raw = skb->nh.raw; | 385 | skb->mac_header = skb->network_header; |
386 | skb_reset_network_header(skb); | 386 | skb_reset_network_header(skb); |
387 | IPCB(skb)->flags = 0; | 387 | IPCB(skb)->flags = 0; |
388 | skb->protocol = htons(ETH_P_IPV6); | 388 | skb->protocol = htons(ETH_P_IPV6); |
@@ -553,7 +553,7 @@ static int ipip6_tunnel_xmit(struct sk_buff *skb, struct net_device *dev) | |||
553 | iph6 = ipv6_hdr(skb); | 553 | iph6 = ipv6_hdr(skb); |
554 | } | 554 | } |
555 | 555 | ||
556 | skb->h.raw = skb->nh.raw; | 556 | skb->transport_header = skb->network_header; |
557 | skb_push(skb, sizeof(struct iphdr)); | 557 | skb_push(skb, sizeof(struct iphdr)); |
558 | skb_reset_network_header(skb); | 558 | skb_reset_network_header(skb); |
559 | memset(&(IPCB(skb)->opt), 0, sizeof(IPCB(skb)->opt)); | 559 | memset(&(IPCB(skb)->opt), 0, sizeof(IPCB(skb)->opt)); |
diff --git a/net/ipv6/xfrm6_mode_beet.c b/net/ipv6/xfrm6_mode_beet.c index 8a01b0da2ddd..2e61d6ddece3 100644 --- a/net/ipv6/xfrm6_mode_beet.c +++ b/net/ipv6/xfrm6_mode_beet.c | |||
@@ -48,8 +48,8 @@ static int xfrm6_beet_output(struct xfrm_state *x, struct sk_buff *skb) | |||
48 | 48 | ||
49 | skb_reset_network_header(skb); | 49 | skb_reset_network_header(skb); |
50 | top_iph = ipv6_hdr(skb); | 50 | top_iph = ipv6_hdr(skb); |
51 | skb->h.raw = skb->nh.raw + sizeof(struct ipv6hdr); | 51 | skb->transport_header = skb->network_header + sizeof(struct ipv6hdr); |
52 | skb->nh.raw += offsetof(struct ipv6hdr, nexthdr); | 52 | skb->network_header += offsetof(struct ipv6hdr, nexthdr); |
53 | 53 | ||
54 | ipv6_addr_copy(&top_iph->saddr, (struct in6_addr *)&x->props.saddr); | 54 | ipv6_addr_copy(&top_iph->saddr, (struct in6_addr *)&x->props.saddr); |
55 | ipv6_addr_copy(&top_iph->daddr, (struct in6_addr *)&x->id.daddr); | 55 | ipv6_addr_copy(&top_iph->daddr, (struct in6_addr *)&x->id.daddr); |
diff --git a/net/ipv6/xfrm6_mode_transport.c b/net/ipv6/xfrm6_mode_transport.c index eb1864b5aae7..c026bfea820a 100644 --- a/net/ipv6/xfrm6_mode_transport.c +++ b/net/ipv6/xfrm6_mode_transport.c | |||
@@ -54,10 +54,10 @@ static int xfrm6_transport_input(struct xfrm_state *x, struct sk_buff *skb) | |||
54 | { | 54 | { |
55 | int ihl = skb->data - skb_transport_header(skb); | 55 | int ihl = skb->data - skb_transport_header(skb); |
56 | 56 | ||
57 | if (skb->h.raw != skb->nh.raw) { | 57 | if (skb->transport_header != skb->network_header) { |
58 | memmove(skb_transport_header(skb), | 58 | memmove(skb_transport_header(skb), |
59 | skb_network_header(skb), ihl); | 59 | skb_network_header(skb), ihl); |
60 | skb->nh.raw = skb->h.raw; | 60 | skb->network_header = skb->transport_header; |
61 | } | 61 | } |
62 | ipv6_hdr(skb)->payload_len = htons(skb->len + ihl - | 62 | ipv6_hdr(skb)->payload_len = htons(skb->len + ihl - |
63 | sizeof(struct ipv6hdr)); | 63 | sizeof(struct ipv6hdr)); |
diff --git a/net/ipv6/xfrm6_mode_tunnel.c b/net/ipv6/xfrm6_mode_tunnel.c index 21d65df7479e..a6c0cdf46ad6 100644 --- a/net/ipv6/xfrm6_mode_tunnel.c +++ b/net/ipv6/xfrm6_mode_tunnel.c | |||
@@ -55,8 +55,8 @@ static int xfrm6_tunnel_output(struct xfrm_state *x, struct sk_buff *skb) | |||
55 | 55 | ||
56 | skb_reset_network_header(skb); | 56 | skb_reset_network_header(skb); |
57 | top_iph = ipv6_hdr(skb); | 57 | top_iph = ipv6_hdr(skb); |
58 | skb->h.raw = skb->nh.raw + sizeof(struct ipv6hdr); | 58 | skb->transport_header = skb->network_header + sizeof(struct ipv6hdr); |
59 | skb->nh.raw += offsetof(struct ipv6hdr, nexthdr); | 59 | skb->network_header += offsetof(struct ipv6hdr, nexthdr); |
60 | 60 | ||
61 | top_iph->version = 6; | 61 | top_iph->version = 6; |
62 | if (xdst->route->ops->family == AF_INET6) { | 62 | if (xdst->route->ops->family == AF_INET6) { |
diff --git a/net/llc/llc_input.c b/net/llc/llc_input.c index b3f65d1e80b1..099ed8fec145 100644 --- a/net/llc/llc_input.c +++ b/net/llc/llc_input.c | |||
@@ -112,7 +112,7 @@ static inline int llc_fixup_skb(struct sk_buff *skb) | |||
112 | if (unlikely(!pskb_may_pull(skb, llc_len))) | 112 | if (unlikely(!pskb_may_pull(skb, llc_len))) |
113 | return 0; | 113 | return 0; |
114 | 114 | ||
115 | skb->h.raw += llc_len; | 115 | skb->transport_header += llc_len; |
116 | skb_pull(skb, llc_len); | 116 | skb_pull(skb, llc_len); |
117 | if (skb->protocol == htons(ETH_P_802_2)) { | 117 | if (skb->protocol == htons(ETH_P_802_2)) { |
118 | __be16 pdulen = eth_hdr(skb)->h_proto; | 118 | __be16 pdulen = eth_hdr(skb)->h_proto; |
diff --git a/net/packet/af_packet.c b/net/packet/af_packet.c index a059cc7be672..51c059b09a37 100644 --- a/net/packet/af_packet.c +++ b/net/packet/af_packet.c | |||
@@ -114,22 +114,22 @@ On receive: | |||
114 | ----------- | 114 | ----------- |
115 | 115 | ||
116 | Incoming, dev->hard_header!=NULL | 116 | Incoming, dev->hard_header!=NULL |
117 | mac.raw -> ll header | 117 | mac_header -> ll header |
118 | data -> data | 118 | data -> data |
119 | 119 | ||
120 | Outgoing, dev->hard_header!=NULL | 120 | Outgoing, dev->hard_header!=NULL |
121 | mac.raw -> ll header | 121 | mac_header -> ll header |
122 | data -> ll header | 122 | data -> ll header |
123 | 123 | ||
124 | Incoming, dev->hard_header==NULL | 124 | Incoming, dev->hard_header==NULL |
125 | mac.raw -> UNKNOWN position. It is very likely, that it points to ll header. | 125 | mac_header -> UNKNOWN position. It is very likely, that it points to ll |
126 | PPP makes it, that is wrong, because introduce assymetry | 126 | header. PPP makes it, that is wrong, because introduce |
127 | between rx and tx paths. | 127 | assymetry between rx and tx paths. |
128 | data -> data | 128 | data -> data |
129 | 129 | ||
130 | Outgoing, dev->hard_header==NULL | 130 | Outgoing, dev->hard_header==NULL |
131 | mac.raw -> data. ll header is still not built! | 131 | mac_header -> data. ll header is still not built! |
132 | data -> data | 132 | data -> data |
133 | 133 | ||
134 | Resume | 134 | Resume |
135 | If dev->hard_header==NULL we are unlikely to restore sensible ll header. | 135 | If dev->hard_header==NULL we are unlikely to restore sensible ll header. |
@@ -139,12 +139,12 @@ On transmit: | |||
139 | ------------ | 139 | ------------ |
140 | 140 | ||
141 | dev->hard_header != NULL | 141 | dev->hard_header != NULL |
142 | mac.raw -> ll header | 142 | mac_header -> ll header |
143 | data -> ll header | 143 | data -> ll header |
144 | 144 | ||
145 | dev->hard_header == NULL (ll header is added by device, we cannot control it) | 145 | dev->hard_header == NULL (ll header is added by device, we cannot control it) |
146 | mac.raw -> data | 146 | mac_header -> data |
147 | data -> data | 147 | data -> data |
148 | 148 | ||
149 | We should set nh.raw on output to correct posistion, | 149 | We should set nh.raw on output to correct posistion, |
150 | packet classifier depends on it. | 150 | packet classifier depends on it. |
diff --git a/net/sctp/input.c b/net/sctp/input.c index f38e91b38719..87feee166da9 100644 --- a/net/sctp/input.c +++ b/net/sctp/input.c | |||
@@ -522,14 +522,14 @@ void sctp_v4_err(struct sk_buff *skb, __u32 info) | |||
522 | } | 522 | } |
523 | 523 | ||
524 | /* Fix up skb to look at the embedded net header. */ | 524 | /* Fix up skb to look at the embedded net header. */ |
525 | saveip = skb->nh.raw; | 525 | saveip = skb->network_header; |
526 | savesctp = skb->h.raw; | 526 | savesctp = skb->transport_header; |
527 | skb_reset_network_header(skb); | 527 | skb_reset_network_header(skb); |
528 | skb_set_transport_header(skb, ihlen); | 528 | skb_set_transport_header(skb, ihlen); |
529 | sk = sctp_err_lookup(AF_INET, skb, sctp_hdr(skb), &asoc, &transport); | 529 | sk = sctp_err_lookup(AF_INET, skb, sctp_hdr(skb), &asoc, &transport); |
530 | /* Put back, the original pointers. */ | 530 | /* Put back, the original pointers. */ |
531 | skb->nh.raw = saveip; | 531 | skb->network_header = saveip; |
532 | skb->h.raw = savesctp; | 532 | skb->transport_header = savesctp; |
533 | if (!sk) { | 533 | if (!sk) { |
534 | ICMP_INC_STATS_BH(ICMP_MIB_INERRORS); | 534 | ICMP_INC_STATS_BH(ICMP_MIB_INERRORS); |
535 | return; | 535 | return; |
diff --git a/net/sctp/ipv6.c b/net/sctp/ipv6.c index cd0af9238782..afcb0093c290 100644 --- a/net/sctp/ipv6.c +++ b/net/sctp/ipv6.c | |||
@@ -132,14 +132,14 @@ SCTP_STATIC void sctp_v6_err(struct sk_buff *skb, struct inet6_skb_parm *opt, | |||
132 | idev = in6_dev_get(skb->dev); | 132 | idev = in6_dev_get(skb->dev); |
133 | 133 | ||
134 | /* Fix up skb to look at the embedded net header. */ | 134 | /* Fix up skb to look at the embedded net header. */ |
135 | saveip = skb->nh.raw; | 135 | saveip = skb->network_header; |
136 | savesctp = skb->h.raw; | 136 | savesctp = skb->transport_header; |
137 | skb_reset_network_header(skb); | 137 | skb_reset_network_header(skb); |
138 | skb_set_transport_header(skb, offset); | 138 | skb_set_transport_header(skb, offset); |
139 | sk = sctp_err_lookup(AF_INET6, skb, sctp_hdr(skb), &asoc, &transport); | 139 | sk = sctp_err_lookup(AF_INET6, skb, sctp_hdr(skb), &asoc, &transport); |
140 | /* Put back, the original pointers. */ | 140 | /* Put back, the original pointers. */ |
141 | skb->nh.raw = saveip; | 141 | skb->network_header = saveip; |
142 | skb->h.raw = savesctp; | 142 | skb->transport_header = savesctp; |
143 | if (!sk) { | 143 | if (!sk) { |
144 | ICMP6_INC_STATS_BH(idev, ICMP6_MIB_INERRORS); | 144 | ICMP6_INC_STATS_BH(idev, ICMP6_MIB_INERRORS); |
145 | goto out; | 145 | goto out; |