diff options
49 files changed, 82 insertions, 73 deletions
diff --git a/drivers/infiniband/hw/cxgb3/iwch_cm.c b/drivers/infiniband/hw/cxgb3/iwch_cm.c index 2d2de9b8b729..66ad4d40ba1d 100644 --- a/drivers/infiniband/hw/cxgb3/iwch_cm.c +++ b/drivers/infiniband/hw/cxgb3/iwch_cm.c | |||
@@ -507,7 +507,7 @@ static void send_mpa_req(struct iwch_ep *ep, struct sk_buff *skb) | |||
507 | */ | 507 | */ |
508 | skb_get(skb); | 508 | skb_get(skb); |
509 | set_arp_failure_handler(skb, arp_failure_discard); | 509 | set_arp_failure_handler(skb, arp_failure_discard); |
510 | skb->h.raw = skb->data; | 510 | skb_reset_transport_header(skb); |
511 | len = skb->len; | 511 | len = skb->len; |
512 | req = (struct tx_data_wr *) skb_push(skb, sizeof(*req)); | 512 | req = (struct tx_data_wr *) skb_push(skb, sizeof(*req)); |
513 | req->wr_hi = htonl(V_WR_OP(FW_WROPCODE_OFLD_TX_DATA)); | 513 | req->wr_hi = htonl(V_WR_OP(FW_WROPCODE_OFLD_TX_DATA)); |
@@ -559,7 +559,7 @@ static int send_mpa_reject(struct iwch_ep *ep, const void *pdata, u8 plen) | |||
559 | skb_get(skb); | 559 | skb_get(skb); |
560 | skb->priority = CPL_PRIORITY_DATA; | 560 | skb->priority = CPL_PRIORITY_DATA; |
561 | set_arp_failure_handler(skb, arp_failure_discard); | 561 | set_arp_failure_handler(skb, arp_failure_discard); |
562 | skb->h.raw = skb->data; | 562 | skb_reset_transport_header(skb); |
563 | req = (struct tx_data_wr *) skb_push(skb, sizeof(*req)); | 563 | req = (struct tx_data_wr *) skb_push(skb, sizeof(*req)); |
564 | req->wr_hi = htonl(V_WR_OP(FW_WROPCODE_OFLD_TX_DATA)); | 564 | req->wr_hi = htonl(V_WR_OP(FW_WROPCODE_OFLD_TX_DATA)); |
565 | req->wr_lo = htonl(V_WR_TID(ep->hwtid)); | 565 | req->wr_lo = htonl(V_WR_TID(ep->hwtid)); |
@@ -610,7 +610,7 @@ static int send_mpa_reply(struct iwch_ep *ep, const void *pdata, u8 plen) | |||
610 | */ | 610 | */ |
611 | skb_get(skb); | 611 | skb_get(skb); |
612 | set_arp_failure_handler(skb, arp_failure_discard); | 612 | set_arp_failure_handler(skb, arp_failure_discard); |
613 | skb->h.raw = skb->data; | 613 | skb_reset_transport_header(skb); |
614 | len = skb->len; | 614 | len = skb->len; |
615 | req = (struct tx_data_wr *) skb_push(skb, sizeof(*req)); | 615 | req = (struct tx_data_wr *) skb_push(skb, sizeof(*req)); |
616 | req->wr_hi = htonl(V_WR_OP(FW_WROPCODE_OFLD_TX_DATA)); | 616 | req->wr_hi = htonl(V_WR_OP(FW_WROPCODE_OFLD_TX_DATA)); |
diff --git a/drivers/net/appletalk/cops.c b/drivers/net/appletalk/cops.c index 28cb79cee910..da6ffa8cd81e 100644 --- a/drivers/net/appletalk/cops.c +++ b/drivers/net/appletalk/cops.c | |||
@@ -855,7 +855,7 @@ static void cops_rx(struct net_device *dev) | |||
855 | 855 | ||
856 | skb_reset_mac_header(skb); /* Point to entire packet. */ | 856 | skb_reset_mac_header(skb); /* Point to entire packet. */ |
857 | skb_pull(skb,3); | 857 | skb_pull(skb,3); |
858 | skb->h.raw = skb->data; /* Point to data (Skip header). */ | 858 | skb_reset_transport_header(skb); /* Point to data (Skip header). */ |
859 | 859 | ||
860 | /* Update the counters. */ | 860 | /* Update the counters. */ |
861 | lp->stats.rx_packets++; | 861 | lp->stats.rx_packets++; |
diff --git a/drivers/net/appletalk/ltpc.c b/drivers/net/appletalk/ltpc.c index 12682439f8bd..dc3bce992dcf 100644 --- a/drivers/net/appletalk/ltpc.c +++ b/drivers/net/appletalk/ltpc.c | |||
@@ -776,7 +776,7 @@ static int sendup_buffer (struct net_device *dev) | |||
776 | /* copy ddp(s,e)hdr + contents */ | 776 | /* copy ddp(s,e)hdr + contents */ |
777 | memcpy(skb->data,(void*)ltdmabuf,len); | 777 | memcpy(skb->data,(void*)ltdmabuf,len); |
778 | 778 | ||
779 | skb->h.raw = skb->data; | 779 | skb_reset_transport_header(skb); |
780 | 780 | ||
781 | stats->rx_packets++; | 781 | stats->rx_packets++; |
782 | stats->rx_bytes+=skb->len; | 782 | stats->rx_bytes+=skb->len; |
@@ -923,7 +923,7 @@ static int ltpc_xmit(struct sk_buff *skb, struct net_device *dev) | |||
923 | cbuf.laptype = skb->data[2]; | 923 | cbuf.laptype = skb->data[2]; |
924 | skb_pull(skb,3); /* skip past LLAP header */ | 924 | skb_pull(skb,3); /* skip past LLAP header */ |
925 | cbuf.length = skb->len; /* this is host order */ | 925 | cbuf.length = skb->len; /* this is host order */ |
926 | skb->h.raw=skb->data; | 926 | skb_reset_transport_header(skb); |
927 | 927 | ||
928 | if(debug & DEBUG_UPPER) { | 928 | if(debug & DEBUG_UPPER) { |
929 | printk("command "); | 929 | printk("command "); |
diff --git a/drivers/net/cxgb3/sge.c b/drivers/net/cxgb3/sge.c index 892e5dcafa04..a891f6f81527 100644 --- a/drivers/net/cxgb3/sge.c +++ b/drivers/net/cxgb3/sge.c | |||
@@ -1622,7 +1622,7 @@ static inline int rx_offload(struct t3cdev *tdev, struct sge_rspq *rq, | |||
1622 | rq->offload_pkts++; | 1622 | rq->offload_pkts++; |
1623 | skb_reset_mac_header(skb); | 1623 | skb_reset_mac_header(skb); |
1624 | skb_reset_network_header(skb); | 1624 | skb_reset_network_header(skb); |
1625 | skb->h.raw = skb->data; | 1625 | skb_reset_transport_header(skb); |
1626 | 1626 | ||
1627 | if (rq->polling) { | 1627 | if (rq->polling) { |
1628 | rx_gather[gather_idx++] = skb; | 1628 | rx_gather[gather_idx++] = skb; |
diff --git a/include/linux/dccp.h b/include/linux/dccp.h index 1cb054bd93f2..1f4df61735f7 100644 --- a/include/linux/dccp.h +++ b/include/linux/dccp.h | |||
@@ -265,9 +265,9 @@ static inline struct dccp_hdr *dccp_hdr(const struct sk_buff *skb) | |||
265 | 265 | ||
266 | static inline struct dccp_hdr *dccp_zeroed_hdr(struct sk_buff *skb, int headlen) | 266 | static inline struct dccp_hdr *dccp_zeroed_hdr(struct sk_buff *skb, int headlen) |
267 | { | 267 | { |
268 | skb->h.raw = skb_push(skb, headlen); | 268 | skb_push(skb, headlen); |
269 | memset(skb->h.raw, 0, headlen); | 269 | skb_reset_transport_header(skb); |
270 | return dccp_hdr(skb); | 270 | return memset(skb->h.raw, 0, headlen); |
271 | } | 271 | } |
272 | 272 | ||
273 | static inline struct dccp_hdr_ext *dccp_hdrx(const struct sk_buff *skb) | 273 | static inline struct dccp_hdr_ext *dccp_hdrx(const struct sk_buff *skb) |
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index 31806a7ce40e..7c1f1756e482 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h | |||
@@ -957,6 +957,11 @@ static inline void skb_reserve(struct sk_buff *skb, int len) | |||
957 | skb->tail += len; | 957 | skb->tail += len; |
958 | } | 958 | } |
959 | 959 | ||
960 | static inline void skb_reset_transport_header(struct sk_buff *skb) | ||
961 | { | ||
962 | skb->h.raw = skb->data; | ||
963 | } | ||
964 | |||
960 | static inline unsigned char *skb_network_header(const struct sk_buff *skb) | 965 | static inline unsigned char *skb_network_header(const struct sk_buff *skb) |
961 | { | 966 | { |
962 | return skb->nh.raw; | 967 | return skb->nh.raw; |
diff --git a/net/appletalk/aarp.c b/net/appletalk/aarp.c index de495c57aa90..5ef6a238bdbc 100644 --- a/net/appletalk/aarp.c +++ b/net/appletalk/aarp.c | |||
@@ -119,7 +119,7 @@ static void __aarp_send_query(struct aarp_entry *a) | |||
119 | /* Set up the buffer */ | 119 | /* Set up the buffer */ |
120 | skb_reserve(skb, dev->hard_header_len + aarp_dl->header_length); | 120 | skb_reserve(skb, dev->hard_header_len + aarp_dl->header_length); |
121 | skb_reset_network_header(skb); | 121 | skb_reset_network_header(skb); |
122 | skb->h.raw = skb->data; | 122 | skb_reset_transport_header(skb); |
123 | skb_put(skb, sizeof(*eah)); | 123 | skb_put(skb, sizeof(*eah)); |
124 | skb->protocol = htons(ETH_P_ATALK); | 124 | skb->protocol = htons(ETH_P_ATALK); |
125 | skb->dev = dev; | 125 | skb->dev = dev; |
@@ -166,7 +166,7 @@ static void aarp_send_reply(struct net_device *dev, struct atalk_addr *us, | |||
166 | /* Set up the buffer */ | 166 | /* Set up the buffer */ |
167 | skb_reserve(skb, dev->hard_header_len + aarp_dl->header_length); | 167 | skb_reserve(skb, dev->hard_header_len + aarp_dl->header_length); |
168 | skb_reset_network_header(skb); | 168 | skb_reset_network_header(skb); |
169 | skb->h.raw = skb->data; | 169 | skb_reset_transport_header(skb); |
170 | skb_put(skb, sizeof(*eah)); | 170 | skb_put(skb, sizeof(*eah)); |
171 | skb->protocol = htons(ETH_P_ATALK); | 171 | skb->protocol = htons(ETH_P_ATALK); |
172 | skb->dev = dev; | 172 | skb->dev = dev; |
@@ -217,7 +217,7 @@ static void aarp_send_probe(struct net_device *dev, struct atalk_addr *us) | |||
217 | /* Set up the buffer */ | 217 | /* Set up the buffer */ |
218 | skb_reserve(skb, dev->hard_header_len + aarp_dl->header_length); | 218 | skb_reserve(skb, dev->hard_header_len + aarp_dl->header_length); |
219 | skb_reset_network_header(skb); | 219 | skb_reset_network_header(skb); |
220 | skb->h.raw = skb->data; | 220 | skb_reset_transport_header(skb); |
221 | skb_put(skb, sizeof(*eah)); | 221 | skb_put(skb, sizeof(*eah)); |
222 | skb->protocol = htons(ETH_P_ATALK); | 222 | skb->protocol = htons(ETH_P_ATALK); |
223 | skb->dev = dev; | 223 | skb->dev = dev; |
diff --git a/net/appletalk/ddp.c b/net/appletalk/ddp.c index 934f25993ce8..137341b4d833 100644 --- a/net/appletalk/ddp.c +++ b/net/appletalk/ddp.c | |||
@@ -1275,7 +1275,7 @@ static int handle_ip_over_ddp(struct sk_buff *skb) | |||
1275 | skb->protocol = htons(ETH_P_IP); | 1275 | skb->protocol = htons(ETH_P_IP); |
1276 | skb_pull(skb, 13); | 1276 | skb_pull(skb, 13); |
1277 | skb->dev = dev; | 1277 | skb->dev = dev; |
1278 | skb->h.raw = skb->data; | 1278 | skb_reset_transport_header(skb); |
1279 | 1279 | ||
1280 | stats = dev->priv; | 1280 | stats = dev->priv; |
1281 | stats->rx_packets++; | 1281 | stats->rx_packets++; |
@@ -1522,7 +1522,7 @@ static int ltalk_rcv(struct sk_buff *skb, struct net_device *dev, | |||
1522 | /* Non routable, so force a drop if we slip up later */ | 1522 | /* Non routable, so force a drop if we slip up later */ |
1523 | ddp->deh_len_hops = htons(skb->len + (DDP_MAXHOPS << 10)); | 1523 | ddp->deh_len_hops = htons(skb->len + (DDP_MAXHOPS << 10)); |
1524 | } | 1524 | } |
1525 | skb->h.raw = skb->data; | 1525 | skb_reset_transport_header(skb); |
1526 | 1526 | ||
1527 | return atalk_rcv(skb, dev, pt, orig_dev); | 1527 | return atalk_rcv(skb, dev, pt, orig_dev); |
1528 | freeit: | 1528 | freeit: |
diff --git a/net/ax25/af_ax25.c b/net/ax25/af_ax25.c index b1a4d60ce9a8..14db01a4ff63 100644 --- a/net/ax25/af_ax25.c +++ b/net/ax25/af_ax25.c | |||
@@ -1631,8 +1631,8 @@ static int ax25_recvmsg(struct kiocb *iocb, struct socket *sock, | |||
1631 | if (!ax25_sk(sk)->pidincl) | 1631 | if (!ax25_sk(sk)->pidincl) |
1632 | skb_pull(skb, 1); /* Remove PID */ | 1632 | skb_pull(skb, 1); /* Remove PID */ |
1633 | 1633 | ||
1634 | skb->h.raw = skb->data; | 1634 | skb_reset_transport_header(skb); |
1635 | copied = skb->len; | 1635 | copied = skb->len; |
1636 | 1636 | ||
1637 | if (copied > size) { | 1637 | if (copied > size) { |
1638 | copied = size; | 1638 | copied = size; |
diff --git a/net/ax25/ax25_in.c b/net/ax25/ax25_in.c index 3b2aac670266..724ad5ce75d4 100644 --- a/net/ax25/ax25_in.c +++ b/net/ax25/ax25_in.c | |||
@@ -62,7 +62,7 @@ static int ax25_rx_fragment(ax25_cb *ax25, struct sk_buff *skb) | |||
62 | 62 | ||
63 | skbn->dev = ax25->ax25_dev->dev; | 63 | skbn->dev = ax25->ax25_dev->dev; |
64 | skb_reset_network_header(skbn); | 64 | skb_reset_network_header(skbn); |
65 | skbn->h.raw = skbn->data; | 65 | skb_reset_transport_header(skbn); |
66 | 66 | ||
67 | /* Copy data from the fragments */ | 67 | /* Copy data from the fragments */ |
68 | while ((skbo = skb_dequeue(&ax25->frag_queue)) != NULL) { | 68 | while ((skbo = skb_dequeue(&ax25->frag_queue)) != NULL) { |
@@ -196,7 +196,7 @@ static int ax25_rcv(struct sk_buff *skb, struct net_device *dev, | |||
196 | * Process the AX.25/LAPB frame. | 196 | * Process the AX.25/LAPB frame. |
197 | */ | 197 | */ |
198 | 198 | ||
199 | skb->h.raw = skb->data; | 199 | skb_reset_transport_header(skb); |
200 | 200 | ||
201 | if ((ax25_dev = ax25_dev_ax25dev(dev)) == NULL) { | 201 | if ((ax25_dev = ax25_dev_ax25dev(dev)) == NULL) { |
202 | kfree_skb(skb); | 202 | kfree_skb(skb); |
@@ -246,7 +246,7 @@ static int ax25_rcv(struct sk_buff *skb, struct net_device *dev, | |||
246 | switch (skb->data[1]) { | 246 | switch (skb->data[1]) { |
247 | case AX25_P_IP: | 247 | case AX25_P_IP: |
248 | skb_pull(skb,2); /* drop PID/CTRL */ | 248 | skb_pull(skb,2); /* drop PID/CTRL */ |
249 | skb->h.raw = skb->data; | 249 | skb_reset_transport_header(skb); |
250 | skb_reset_network_header(skb); | 250 | skb_reset_network_header(skb); |
251 | skb->dev = dev; | 251 | skb->dev = dev; |
252 | skb->pkt_type = PACKET_HOST; | 252 | skb->pkt_type = PACKET_HOST; |
@@ -256,7 +256,7 @@ static int ax25_rcv(struct sk_buff *skb, struct net_device *dev, | |||
256 | 256 | ||
257 | case AX25_P_ARP: | 257 | case AX25_P_ARP: |
258 | skb_pull(skb,2); | 258 | skb_pull(skb,2); |
259 | skb->h.raw = skb->data; | 259 | skb_reset_transport_header(skb); |
260 | skb_reset_network_header(skb); | 260 | skb_reset_network_header(skb); |
261 | skb->dev = dev; | 261 | skb->dev = dev; |
262 | skb->pkt_type = PACKET_HOST; | 262 | skb->pkt_type = PACKET_HOST; |
diff --git a/net/bluetooth/af_bluetooth.c b/net/bluetooth/af_bluetooth.c index c7228cfc6218..d942b946ba07 100644 --- a/net/bluetooth/af_bluetooth.c +++ b/net/bluetooth/af_bluetooth.c | |||
@@ -221,7 +221,7 @@ int bt_sock_recvmsg(struct kiocb *iocb, struct socket *sock, | |||
221 | copied = len; | 221 | copied = len; |
222 | } | 222 | } |
223 | 223 | ||
224 | skb->h.raw = skb->data; | 224 | skb_reset_transport_header(skb); |
225 | err = skb_copy_datagram_iovec(skb, 0, msg->msg_iov, copied); | 225 | err = skb_copy_datagram_iovec(skb, 0, msg->msg_iov, copied); |
226 | 226 | ||
227 | skb_free_datagram(sk, skb); | 227 | skb_free_datagram(sk, skb); |
diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c index 64fea0903fd7..c11ceb6b3f79 100644 --- a/net/bluetooth/hci_core.c +++ b/net/bluetooth/hci_core.c | |||
@@ -1074,11 +1074,11 @@ static void hci_add_acl_hdr(struct sk_buff *skb, __u16 handle, __u16 flags) | |||
1074 | struct hci_acl_hdr *hdr; | 1074 | struct hci_acl_hdr *hdr; |
1075 | int len = skb->len; | 1075 | int len = skb->len; |
1076 | 1076 | ||
1077 | hdr = (struct hci_acl_hdr *) skb_push(skb, HCI_ACL_HDR_SIZE); | 1077 | skb_push(skb, HCI_ACL_HDR_SIZE); |
1078 | skb_reset_transport_header(skb); | ||
1079 | hdr = (struct hci_acl_hdr *)skb->h.raw; | ||
1078 | hdr->handle = cpu_to_le16(hci_handle_pack(handle, flags)); | 1080 | hdr->handle = cpu_to_le16(hci_handle_pack(handle, flags)); |
1079 | hdr->dlen = cpu_to_le16(len); | 1081 | hdr->dlen = cpu_to_le16(len); |
1080 | |||
1081 | skb->h.raw = (void *) hdr; | ||
1082 | } | 1082 | } |
1083 | 1083 | ||
1084 | int hci_send_acl(struct hci_conn *conn, struct sk_buff *skb, __u16 flags) | 1084 | int hci_send_acl(struct hci_conn *conn, struct sk_buff *skb, __u16 flags) |
@@ -1143,7 +1143,8 @@ int hci_send_sco(struct hci_conn *conn, struct sk_buff *skb) | |||
1143 | hdr.handle = cpu_to_le16(conn->handle); | 1143 | hdr.handle = cpu_to_le16(conn->handle); |
1144 | hdr.dlen = skb->len; | 1144 | hdr.dlen = skb->len; |
1145 | 1145 | ||
1146 | skb->h.raw = skb_push(skb, HCI_SCO_HDR_SIZE); | 1146 | skb_push(skb, HCI_SCO_HDR_SIZE); |
1147 | skb_reset_transport_header(skb); | ||
1147 | memcpy(skb->h.raw, &hdr, HCI_SCO_HDR_SIZE); | 1148 | memcpy(skb->h.raw, &hdr, HCI_SCO_HDR_SIZE); |
1148 | 1149 | ||
1149 | skb->dev = (void *) hdev; | 1150 | skb->dev = (void *) hdev; |
diff --git a/net/bluetooth/hci_sock.c b/net/bluetooth/hci_sock.c index 71f5cfbbebb8..832b5f44be5c 100644 --- a/net/bluetooth/hci_sock.c +++ b/net/bluetooth/hci_sock.c | |||
@@ -375,7 +375,7 @@ static int hci_sock_recvmsg(struct kiocb *iocb, struct socket *sock, | |||
375 | copied = len; | 375 | copied = len; |
376 | } | 376 | } |
377 | 377 | ||
378 | skb->h.raw = skb->data; | 378 | skb_reset_transport_header(skb); |
379 | err = skb_copy_datagram_iovec(skb, 0, msg->msg_iov, copied); | 379 | err = skb_copy_datagram_iovec(skb, 0, msg->msg_iov, copied); |
380 | 380 | ||
381 | hci_sock_cmsg(sk, msg, skb); | 381 | hci_sock_cmsg(sk, msg, skb); |
diff --git a/net/core/dev.c b/net/core/dev.c index 3af0bdc86491..99f15728d9cb 100644 --- a/net/core/dev.c +++ b/net/core/dev.c | |||
@@ -1773,7 +1773,7 @@ int netif_receive_skb(struct sk_buff *skb) | |||
1773 | __get_cpu_var(netdev_rx_stat).total++; | 1773 | __get_cpu_var(netdev_rx_stat).total++; |
1774 | 1774 | ||
1775 | skb_reset_network_header(skb); | 1775 | skb_reset_network_header(skb); |
1776 | skb->h.raw = skb->data; | 1776 | skb_reset_transport_header(skb); |
1777 | skb->mac_len = skb->nh.raw - skb->mac.raw; | 1777 | skb->mac_len = skb->nh.raw - skb->mac.raw; |
1778 | 1778 | ||
1779 | pt_prev = NULL; | 1779 | pt_prev = NULL; |
diff --git a/net/core/netpoll.c b/net/core/netpoll.c index 496b06244a8e..8b22723d6436 100644 --- a/net/core/netpoll.c +++ b/net/core/netpoll.c | |||
@@ -362,7 +362,7 @@ static void arp_reply(struct sk_buff *skb) | |||
362 | return; | 362 | return; |
363 | 363 | ||
364 | skb_reset_network_header(skb); | 364 | skb_reset_network_header(skb); |
365 | skb->h.raw = skb->data; | 365 | skb_reset_transport_header(skb); |
366 | arp = arp_hdr(skb); | 366 | arp = arp_hdr(skb); |
367 | 367 | ||
368 | if ((arp->ar_hrd != htons(ARPHRD_ETHER) && | 368 | if ((arp->ar_hrd != htons(ARPHRD_ETHER) && |
diff --git a/net/decnet/dn_nsp_in.c b/net/decnet/dn_nsp_in.c index 9d20904f6f52..d9498a165acf 100644 --- a/net/decnet/dn_nsp_in.c +++ b/net/decnet/dn_nsp_in.c | |||
@@ -725,7 +725,7 @@ static int dn_nsp_rx_packet(struct sk_buff *skb) | |||
725 | if (!pskb_may_pull(skb, 2)) | 725 | if (!pskb_may_pull(skb, 2)) |
726 | goto free_out; | 726 | goto free_out; |
727 | 727 | ||
728 | skb->h.raw = skb->data; | 728 | skb_reset_transport_header(skb); |
729 | cb->nsp_flags = *ptr++; | 729 | cb->nsp_flags = *ptr++; |
730 | 730 | ||
731 | if (decnet_debug_level & 2) | 731 | if (decnet_debug_level & 2) |
diff --git a/net/decnet/dn_nsp_out.c b/net/decnet/dn_nsp_out.c index 2d2cda82c7db..84b8c5b45fef 100644 --- a/net/decnet/dn_nsp_out.c +++ b/net/decnet/dn_nsp_out.c | |||
@@ -79,7 +79,7 @@ static void dn_nsp_send(struct sk_buff *skb) | |||
79 | struct dst_entry *dst; | 79 | struct dst_entry *dst; |
80 | struct flowi fl; | 80 | struct flowi fl; |
81 | 81 | ||
82 | skb->h.raw = skb->data; | 82 | skb_reset_transport_header(skb); |
83 | scp->stamp = jiffies; | 83 | scp->stamp = jiffies; |
84 | 84 | ||
85 | dst = sk_dst_check(sk, 0); | 85 | dst = sk_dst_check(sk, 0); |
diff --git a/net/decnet/dn_route.c b/net/decnet/dn_route.c index 32a7db36c9e5..bb73bf16630f 100644 --- a/net/decnet/dn_route.c +++ b/net/decnet/dn_route.c | |||
@@ -504,7 +504,7 @@ static int dn_route_rx_long(struct sk_buff *skb) | |||
504 | goto drop_it; | 504 | goto drop_it; |
505 | 505 | ||
506 | skb_pull(skb, 20); | 506 | skb_pull(skb, 20); |
507 | skb->h.raw = skb->data; | 507 | skb_reset_transport_header(skb); |
508 | 508 | ||
509 | /* Destination info */ | 509 | /* Destination info */ |
510 | ptr += 2; | 510 | ptr += 2; |
@@ -542,7 +542,7 @@ static int dn_route_rx_short(struct sk_buff *skb) | |||
542 | goto drop_it; | 542 | goto drop_it; |
543 | 543 | ||
544 | skb_pull(skb, 5); | 544 | skb_pull(skb, 5); |
545 | skb->h.raw = skb->data; | 545 | skb_reset_transport_header(skb); |
546 | 546 | ||
547 | cb->dst = *(__le16 *)ptr; | 547 | cb->dst = *(__le16 *)ptr; |
548 | ptr += 2; | 548 | ptr += 2; |
diff --git a/net/ipv4/af_inet.c b/net/ipv4/af_inet.c index e7720c72a6e2..f011390f19c9 100644 --- a/net/ipv4/af_inet.c +++ b/net/ipv4/af_inet.c | |||
@@ -1120,7 +1120,8 @@ static int inet_gso_send_check(struct sk_buff *skb) | |||
1120 | if (unlikely(!pskb_may_pull(skb, ihl))) | 1120 | if (unlikely(!pskb_may_pull(skb, ihl))) |
1121 | goto out; | 1121 | goto out; |
1122 | 1122 | ||
1123 | skb->h.raw = __skb_pull(skb, ihl); | 1123 | __skb_pull(skb, ihl); |
1124 | skb_reset_transport_header(skb); | ||
1124 | iph = ip_hdr(skb); | 1125 | iph = ip_hdr(skb); |
1125 | proto = iph->protocol & (MAX_INET_PROTOS - 1); | 1126 | proto = iph->protocol & (MAX_INET_PROTOS - 1); |
1126 | err = -EPROTONOSUPPORT; | 1127 | err = -EPROTONOSUPPORT; |
@@ -1163,7 +1164,8 @@ static struct sk_buff *inet_gso_segment(struct sk_buff *skb, int features) | |||
1163 | if (unlikely(!pskb_may_pull(skb, ihl))) | 1164 | if (unlikely(!pskb_may_pull(skb, ihl))) |
1164 | goto out; | 1165 | goto out; |
1165 | 1166 | ||
1166 | skb->h.raw = __skb_pull(skb, ihl); | 1167 | __skb_pull(skb, ihl); |
1168 | skb_reset_transport_header(skb); | ||
1167 | iph = ip_hdr(skb); | 1169 | iph = ip_hdr(skb); |
1168 | id = ntohs(iph->id); | 1170 | id = ntohs(iph->id); |
1169 | proto = iph->protocol & (MAX_INET_PROTOS - 1); | 1171 | proto = iph->protocol & (MAX_INET_PROTOS - 1); |
diff --git a/net/ipv4/ah4.c b/net/ipv4/ah4.c index 00fd31da252e..ebcc797e1c13 100644 --- a/net/ipv4/ah4.c +++ b/net/ipv4/ah4.c | |||
@@ -182,7 +182,8 @@ static int ah_input(struct xfrm_state *x, struct sk_buff *skb) | |||
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->nh.raw += ah_hlen; |
185 | skb->h.raw = 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_pull(skb, ah_hlen + ihl); | 187 | __skb_pull(skb, ah_hlen + ihl); |
187 | 188 | ||
188 | return 0; | 189 | return 0; |
diff --git a/net/ipv4/ip_input.c b/net/ipv4/ip_input.c index 237880a80432..324e7e0fdb2a 100644 --- a/net/ipv4/ip_input.c +++ b/net/ipv4/ip_input.c | |||
@@ -201,7 +201,7 @@ static inline int ip_local_deliver_finish(struct sk_buff *skb) | |||
201 | __skb_pull(skb, ip_hdrlen(skb)); | 201 | __skb_pull(skb, ip_hdrlen(skb)); |
202 | 202 | ||
203 | /* Point into the IP datagram, just past the header. */ | 203 | /* Point into the IP datagram, just past the header. */ |
204 | skb->h.raw = skb->data; | 204 | skb_reset_transport_header(skb); |
205 | 205 | ||
206 | rcu_read_lock(); | 206 | rcu_read_lock(); |
207 | { | 207 | { |
diff --git a/net/ipv4/ip_output.c b/net/ipv4/ip_output.c index 1abc48899f2d..63c05be0764d 100644 --- a/net/ipv4/ip_output.c +++ b/net/ipv4/ip_output.c | |||
@@ -500,7 +500,7 @@ int ip_fragment(struct sk_buff *skb, int (*output)(struct sk_buff*)) | |||
500 | * before previous one went down. */ | 500 | * before previous one went down. */ |
501 | if (frag) { | 501 | if (frag) { |
502 | frag->ip_summed = CHECKSUM_NONE; | 502 | frag->ip_summed = CHECKSUM_NONE; |
503 | frag->h.raw = frag->data; | 503 | skb_reset_transport_header(frag); |
504 | __skb_push(frag, hlen); | 504 | __skb_push(frag, hlen); |
505 | skb_reset_network_header(frag); | 505 | skb_reset_network_header(frag); |
506 | memcpy(skb_network_header(frag), iph, hlen); | 506 | memcpy(skb_network_header(frag), iph, hlen); |
diff --git a/net/ipv4/ipmr.c b/net/ipv4/ipmr.c index e0021499093f..03869d91f6f0 100644 --- a/net/ipv4/ipmr.c +++ b/net/ipv4/ipmr.c | |||
@@ -563,7 +563,7 @@ static int ipmr_cache_report(struct sk_buff *pkt, vifi_t vifi, int assert) | |||
563 | */ | 563 | */ |
564 | skb_push(skb, sizeof(struct iphdr)); | 564 | skb_push(skb, sizeof(struct iphdr)); |
565 | skb_reset_network_header(skb); | 565 | skb_reset_network_header(skb); |
566 | skb->h.raw = skb->data; | 566 | skb_reset_transport_header(skb); |
567 | msg = (struct igmpmsg *)skb_network_header(skb); | 567 | msg = (struct igmpmsg *)skb_network_header(skb); |
568 | memcpy(msg, skb_network_header(pkt), sizeof(struct iphdr)); | 568 | memcpy(msg, skb_network_header(pkt), sizeof(struct iphdr)); |
569 | msg->im_msgtype = IGMPMSG_WHOLEPKT; | 569 | msg->im_msgtype = IGMPMSG_WHOLEPKT; |
diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c index b4cad50c18e9..13739cd8206f 100644 --- a/net/ipv4/udp.c +++ b/net/ipv4/udp.c | |||
@@ -1002,7 +1002,8 @@ static int udp_encap_rcv(struct sock * sk, struct sk_buff *skb) | |||
1002 | * transport header to point to ESP. Keep UDP on the stack | 1002 | * transport header to point to ESP. Keep UDP on the stack |
1003 | * for later. | 1003 | * for later. |
1004 | */ | 1004 | */ |
1005 | skb->h.raw = __skb_pull(skb, len); | 1005 | __skb_pull(skb, len); |
1006 | skb_reset_transport_header(skb); | ||
1006 | 1007 | ||
1007 | /* modify the protocol (it's ESP!) */ | 1008 | /* modify the protocol (it's ESP!) */ |
1008 | iph->protocol = IPPROTO_ESP; | 1009 | iph->protocol = IPPROTO_ESP; |
diff --git a/net/ipv4/xfrm4_mode_transport.c b/net/ipv4/xfrm4_mode_transport.c index 124f24bc4dbc..2c46cbb3bbb5 100644 --- a/net/ipv4/xfrm4_mode_transport.c +++ b/net/ipv4/xfrm4_mode_transport.c | |||
@@ -52,7 +52,7 @@ static int xfrm4_transport_input(struct xfrm_state *x, struct sk_buff *skb) | |||
52 | skb->nh.raw = skb->h.raw; | 52 | skb->nh.raw = skb->h.raw; |
53 | } | 53 | } |
54 | ip_hdr(skb)->tot_len = htons(skb->len + ihl); | 54 | ip_hdr(skb)->tot_len = htons(skb->len + ihl); |
55 | skb->h.raw = skb->data; | 55 | skb_reset_transport_header(skb); |
56 | return 0; | 56 | return 0; |
57 | } | 57 | } |
58 | 58 | ||
diff --git a/net/ipv6/ip6_input.c b/net/ipv6/ip6_input.c index 9c3c787a21c1..2dd32a2ca056 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 = (u8 *)(hdr + 1); | 104 | skb->h.raw = skb->nh.raw + 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 1900c6226866..0f4434eff66a 100644 --- a/net/ipv6/ip6_output.c +++ b/net/ipv6/ip6_output.c | |||
@@ -654,7 +654,7 @@ static int ip6_fragment(struct sk_buff *skb, int (*output)(struct sk_buff *)) | |||
654 | * before previous one went down. */ | 654 | * before previous one went down. */ |
655 | if (frag) { | 655 | if (frag) { |
656 | frag->ip_summed = CHECKSUM_NONE; | 656 | frag->ip_summed = CHECKSUM_NONE; |
657 | frag->h.raw = frag->data; | 657 | skb_reset_transport_header(frag); |
658 | fh = (struct frag_hdr*)__skb_push(frag, sizeof(struct frag_hdr)); | 658 | fh = (struct frag_hdr*)__skb_push(frag, sizeof(struct frag_hdr)); |
659 | __skb_push(frag, hlen); | 659 | __skb_push(frag, hlen); |
660 | skb_reset_network_header(frag); | 660 | skb_reset_network_header(frag); |
@@ -747,8 +747,8 @@ slow_path: | |||
747 | skb_reserve(frag, LL_RESERVED_SPACE(rt->u.dst.dev)); | 747 | skb_reserve(frag, LL_RESERVED_SPACE(rt->u.dst.dev)); |
748 | skb_put(frag, len + hlen + sizeof(struct frag_hdr)); | 748 | skb_put(frag, len + hlen + sizeof(struct frag_hdr)); |
749 | skb_reset_network_header(frag); | 749 | skb_reset_network_header(frag); |
750 | fh = (struct frag_hdr*)(frag->data + hlen); | 750 | fh = (struct frag_hdr *)(skb_network_header(frag) + hlen); |
751 | frag->h.raw = frag->data + hlen + sizeof(struct frag_hdr); | 751 | frag->h.raw = frag->nh.raw + hlen + sizeof(struct frag_hdr); |
752 | 752 | ||
753 | /* | 753 | /* |
754 | * Charge the memory for the fragment to any owner | 754 | * Charge the memory for the fragment to any owner |
@@ -991,7 +991,7 @@ static inline int ip6_ufo_append_data(struct sock *sk, | |||
991 | skb_reset_network_header(skb); | 991 | skb_reset_network_header(skb); |
992 | 992 | ||
993 | /* initialize protocol header pointer */ | 993 | /* initialize protocol header pointer */ |
994 | skb->h.raw = skb->data + fragheaderlen; | 994 | skb->h.raw = skb->nh.raw + fragheaderlen; |
995 | 995 | ||
996 | skb->ip_summed = CHECKSUM_PARTIAL; | 996 | skb->ip_summed = CHECKSUM_PARTIAL; |
997 | skb->csum = 0; | 997 | skb->csum = 0; |
diff --git a/net/ipv6/ipv6_sockglue.c b/net/ipv6/ipv6_sockglue.c index d16e0fd2cd89..da930fa089c9 100644 --- a/net/ipv6/ipv6_sockglue.c +++ b/net/ipv6/ipv6_sockglue.c | |||
@@ -108,7 +108,7 @@ static int ipv6_gso_send_check(struct sk_buff *skb) | |||
108 | rcu_read_lock(); | 108 | rcu_read_lock(); |
109 | ops = ipv6_gso_pull_exthdrs(skb, ipv6h->nexthdr); | 109 | ops = ipv6_gso_pull_exthdrs(skb, ipv6h->nexthdr); |
110 | if (likely(ops && ops->gso_send_check)) { | 110 | if (likely(ops && ops->gso_send_check)) { |
111 | skb->h.raw = skb->data; | 111 | skb_reset_transport_header(skb); |
112 | err = ops->gso_send_check(skb); | 112 | err = ops->gso_send_check(skb); |
113 | } | 113 | } |
114 | rcu_read_unlock(); | 114 | rcu_read_unlock(); |
@@ -144,7 +144,7 @@ static struct sk_buff *ipv6_gso_segment(struct sk_buff *skb, int features) | |||
144 | rcu_read_lock(); | 144 | rcu_read_lock(); |
145 | ops = ipv6_gso_pull_exthdrs(skb, ipv6h->nexthdr); | 145 | ops = ipv6_gso_pull_exthdrs(skb, ipv6h->nexthdr); |
146 | if (likely(ops && ops->gso_segment)) { | 146 | if (likely(ops && ops->gso_segment)) { |
147 | skb->h.raw = skb->data; | 147 | skb_reset_transport_header(skb); |
148 | segs = ops->gso_segment(skb, features); | 148 | segs = ops->gso_segment(skb, features); |
149 | } | 149 | } |
150 | rcu_read_unlock(); | 150 | rcu_read_unlock(); |
diff --git a/net/ipv6/netfilter/nf_conntrack_reasm.c b/net/ipv6/netfilter/nf_conntrack_reasm.c index d3fbb1f1caf5..75138cf1fa61 100644 --- a/net/ipv6/netfilter/nf_conntrack_reasm.c +++ b/net/ipv6/netfilter/nf_conntrack_reasm.c | |||
@@ -634,7 +634,7 @@ nf_ct_frag6_reasm(struct nf_ct_frag6_queue *fq, struct net_device *dev) | |||
634 | head->nh.raw += sizeof(struct frag_hdr); | 634 | head->nh.raw += sizeof(struct frag_hdr); |
635 | 635 | ||
636 | skb_shinfo(head)->frag_list = head->next; | 636 | skb_shinfo(head)->frag_list = head->next; |
637 | head->h.raw = head->data; | 637 | skb_reset_transport_header(head); |
638 | skb_push(head, head->data - skb_network_header(head)); | 638 | skb_push(head, head->data - skb_network_header(head)); |
639 | atomic_sub(head->truesize, &nf_ct_frag6_mem); | 639 | atomic_sub(head->truesize, &nf_ct_frag6_mem); |
640 | 640 | ||
diff --git a/net/ipv6/reassembly.c b/net/ipv6/reassembly.c index 156a37fe3ff3..2594f0fb290d 100644 --- a/net/ipv6/reassembly.c +++ b/net/ipv6/reassembly.c | |||
@@ -653,7 +653,7 @@ static int ip6_frag_reasm(struct frag_queue *fq, struct sk_buff **skb_in, | |||
653 | head->nh.raw += sizeof(struct frag_hdr); | 653 | head->nh.raw += sizeof(struct frag_hdr); |
654 | 654 | ||
655 | skb_shinfo(head)->frag_list = head->next; | 655 | skb_shinfo(head)->frag_list = head->next; |
656 | head->h.raw = head->data; | 656 | skb_reset_transport_header(head); |
657 | skb_push(head, head->data - skb_network_header(head)); | 657 | skb_push(head, head->data - skb_network_header(head)); |
658 | atomic_sub(head->truesize, &ip6_frag_mem); | 658 | atomic_sub(head->truesize, &ip6_frag_mem); |
659 | 659 | ||
diff --git a/net/ipv6/xfrm6_mode_transport.c b/net/ipv6/xfrm6_mode_transport.c index 358b60d9d912..cae6cacd58c4 100644 --- a/net/ipv6/xfrm6_mode_transport.c +++ b/net/ipv6/xfrm6_mode_transport.c | |||
@@ -59,7 +59,7 @@ static int xfrm6_transport_input(struct xfrm_state *x, struct sk_buff *skb) | |||
59 | } | 59 | } |
60 | ipv6_hdr(skb)->payload_len = htons(skb->len + ihl - | 60 | ipv6_hdr(skb)->payload_len = htons(skb->len + ihl - |
61 | sizeof(struct ipv6hdr)); | 61 | sizeof(struct ipv6hdr)); |
62 | skb->h.raw = skb->data; | 62 | skb_reset_transport_header(skb); |
63 | return 0; | 63 | return 0; |
64 | } | 64 | } |
65 | 65 | ||
diff --git a/net/ipx/af_ipx.c b/net/ipx/af_ipx.c index 9aa7b961b3eb..392f8bc92691 100644 --- a/net/ipx/af_ipx.c +++ b/net/ipx/af_ipx.c | |||
@@ -577,7 +577,7 @@ static struct sk_buff *ipxitf_adjust_skbuff(struct ipx_interface *intrfc, | |||
577 | if (skb2) { | 577 | if (skb2) { |
578 | skb_reserve(skb2, out_offset); | 578 | skb_reserve(skb2, out_offset); |
579 | skb_reset_network_header(skb2); | 579 | skb_reset_network_header(skb2); |
580 | skb2->h.raw = skb2->data; | 580 | skb_reset_transport_header(skb2); |
581 | skb_put(skb2, skb->len); | 581 | skb_put(skb2, skb->len); |
582 | memcpy(ipx_hdr(skb2), ipx_hdr(skb), skb->len); | 582 | memcpy(ipx_hdr(skb2), ipx_hdr(skb), skb->len); |
583 | memcpy(skb2->cb, skb->cb, sizeof(skb->cb)); | 583 | memcpy(skb2->cb, skb->cb, sizeof(skb->cb)); |
diff --git a/net/ipx/ipx_route.c b/net/ipx/ipx_route.c index e8277f544e72..e16c11423527 100644 --- a/net/ipx/ipx_route.c +++ b/net/ipx/ipx_route.c | |||
@@ -204,7 +204,7 @@ int ipxrtr_route_packet(struct sock *sk, struct sockaddr_ipx *usipx, | |||
204 | 204 | ||
205 | /* Fill in IPX header */ | 205 | /* Fill in IPX header */ |
206 | skb_reset_network_header(skb); | 206 | skb_reset_network_header(skb); |
207 | skb->h.raw = skb->data; | 207 | skb_reset_transport_header(skb); |
208 | skb_put(skb, sizeof(struct ipxhdr)); | 208 | skb_put(skb, sizeof(struct ipxhdr)); |
209 | ipx = ipx_hdr(skb); | 209 | ipx = ipx_hdr(skb); |
210 | ipx->ipx_pktsize = htons(len + sizeof(struct ipxhdr)); | 210 | ipx->ipx_pktsize = htons(len + sizeof(struct ipxhdr)); |
diff --git a/net/irda/af_irda.c b/net/irda/af_irda.c index 0eb7d596d470..c3cd2ba123e5 100644 --- a/net/irda/af_irda.c +++ b/net/irda/af_irda.c | |||
@@ -1363,8 +1363,8 @@ static int irda_recvmsg_dgram(struct kiocb *iocb, struct socket *sock, | |||
1363 | if (!skb) | 1363 | if (!skb) |
1364 | return err; | 1364 | return err; |
1365 | 1365 | ||
1366 | skb->h.raw = skb->data; | 1366 | skb_reset_transport_header(skb); |
1367 | copied = skb->len; | 1367 | copied = skb->len; |
1368 | 1368 | ||
1369 | if (copied > size) { | 1369 | if (copied > size) { |
1370 | IRDA_DEBUG(2, "%s(), Received truncated frame (%zd < %zd)!\n", | 1370 | IRDA_DEBUG(2, "%s(), Received truncated frame (%zd < %zd)!\n", |
diff --git a/net/irda/irlap_frame.c b/net/irda/irlap_frame.c index 7c815de4a3bf..803ac4187485 100644 --- a/net/irda/irlap_frame.c +++ b/net/irda/irlap_frame.c | |||
@@ -95,7 +95,7 @@ void irlap_queue_xmit(struct irlap_cb *self, struct sk_buff *skb) | |||
95 | skb->dev = self->netdev; | 95 | skb->dev = self->netdev; |
96 | skb_reset_mac_header(skb); | 96 | skb_reset_mac_header(skb); |
97 | skb_reset_network_header(skb); | 97 | skb_reset_network_header(skb); |
98 | skb->h.raw = skb->data; | 98 | skb_reset_transport_header(skb); |
99 | skb->protocol = htons(ETH_P_IRDA); | 99 | skb->protocol = htons(ETH_P_IRDA); |
100 | skb->priority = TC_PRIO_BESTEFFORT; | 100 | skb->priority = TC_PRIO_BESTEFFORT; |
101 | 101 | ||
diff --git a/net/iucv/af_iucv.c b/net/iucv/af_iucv.c index a485496059c6..55632883d17b 100644 --- a/net/iucv/af_iucv.c +++ b/net/iucv/af_iucv.c | |||
@@ -953,7 +953,7 @@ static void iucv_callback_rx(struct iucv_path *path, struct iucv_message *msg) | |||
953 | return; | 953 | return; |
954 | } | 954 | } |
955 | 955 | ||
956 | skb->h.raw = skb->data; | 956 | skb_reset_transport_header(skb); |
957 | skb_reset_network_header(skb); | 957 | skb_reset_network_header(skb); |
958 | skb->len = msg->length; | 958 | skb->len = msg->length; |
959 | } | 959 | } |
diff --git a/net/key/af_key.c b/net/key/af_key.c index 345019345f09..3cd228aacfe8 100644 --- a/net/key/af_key.c +++ b/net/key/af_key.c | |||
@@ -3667,7 +3667,7 @@ static int pfkey_recvmsg(struct kiocb *kiocb, | |||
3667 | copied = len; | 3667 | copied = len; |
3668 | } | 3668 | } |
3669 | 3669 | ||
3670 | skb->h.raw = skb->data; | 3670 | skb_reset_transport_header(skb); |
3671 | err = skb_copy_datagram_iovec(skb, 0, msg->msg_iov, copied); | 3671 | err = skb_copy_datagram_iovec(skb, 0, msg->msg_iov, copied); |
3672 | if (err) | 3672 | if (err) |
3673 | goto out_free; | 3673 | goto out_free; |
diff --git a/net/llc/llc_sap.c b/net/llc/llc_sap.c index e76bbbfb64bd..2525165e2e8f 100644 --- a/net/llc/llc_sap.c +++ b/net/llc/llc_sap.c | |||
@@ -39,7 +39,7 @@ struct sk_buff *llc_alloc_frame(struct sock *sk, struct net_device *dev) | |||
39 | skb_reset_mac_header(skb); | 39 | skb_reset_mac_header(skb); |
40 | skb_reserve(skb, 50); | 40 | skb_reserve(skb, 50); |
41 | skb_reset_network_header(skb); | 41 | skb_reset_network_header(skb); |
42 | skb->h.raw = skb->data; | 42 | skb_reset_transport_header(skb); |
43 | skb->protocol = htons(ETH_P_802_2); | 43 | skb->protocol = htons(ETH_P_802_2); |
44 | skb->dev = dev; | 44 | skb->dev = dev; |
45 | if (sk != NULL) | 45 | if (sk != NULL) |
diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c index 350ed1c0e702..50dc5edb7752 100644 --- a/net/netlink/af_netlink.c +++ b/net/netlink/af_netlink.c | |||
@@ -1215,7 +1215,7 @@ static int netlink_recvmsg(struct kiocb *kiocb, struct socket *sock, | |||
1215 | copied = len; | 1215 | copied = len; |
1216 | } | 1216 | } |
1217 | 1217 | ||
1218 | skb->h.raw = skb->data; | 1218 | skb_reset_transport_header(skb); |
1219 | err = skb_copy_datagram_iovec(skb, 0, msg->msg_iov, copied); | 1219 | err = skb_copy_datagram_iovec(skb, 0, msg->msg_iov, copied); |
1220 | 1220 | ||
1221 | if (msg->msg_name) { | 1221 | if (msg->msg_name) { |
diff --git a/net/netrom/af_netrom.c b/net/netrom/af_netrom.c index a54e7ef2568a..8d0f30a015df 100644 --- a/net/netrom/af_netrom.c +++ b/net/netrom/af_netrom.c | |||
@@ -878,7 +878,7 @@ int nr_rx_frame(struct sk_buff *skb, struct net_device *dev) | |||
878 | if (frametype == NR_PROTOEXT && | 878 | if (frametype == NR_PROTOEXT && |
879 | circuit_index == NR_PROTO_IP && circuit_id == NR_PROTO_IP) { | 879 | circuit_index == NR_PROTO_IP && circuit_id == NR_PROTO_IP) { |
880 | skb_pull(skb, NR_NETWORK_LEN + NR_TRANSPORT_LEN); | 880 | skb_pull(skb, NR_NETWORK_LEN + NR_TRANSPORT_LEN); |
881 | skb->h.raw = skb->data; | 881 | skb_reset_transport_header(skb); |
882 | 882 | ||
883 | return nr_rx_ip(skb, dev); | 883 | return nr_rx_ip(skb, dev); |
884 | } | 884 | } |
@@ -904,7 +904,7 @@ int nr_rx_frame(struct sk_buff *skb, struct net_device *dev) | |||
904 | } | 904 | } |
905 | 905 | ||
906 | if (sk != NULL) { | 906 | if (sk != NULL) { |
907 | skb->h.raw = skb->data; | 907 | skb_reset_transport_header(skb); |
908 | 908 | ||
909 | if (frametype == NR_CONNACK && skb->len == 22) | 909 | if (frametype == NR_CONNACK && skb->len == 22) |
910 | nr_sk(sk)->bpqext = 1; | 910 | nr_sk(sk)->bpqext = 1; |
@@ -1149,7 +1149,7 @@ static int nr_recvmsg(struct kiocb *iocb, struct socket *sock, | |||
1149 | return er; | 1149 | return er; |
1150 | } | 1150 | } |
1151 | 1151 | ||
1152 | skb->h.raw = skb->data; | 1152 | skb_reset_transport_header(skb); |
1153 | copied = skb->len; | 1153 | copied = skb->len; |
1154 | 1154 | ||
1155 | if (copied > size) { | 1155 | if (copied > size) { |
diff --git a/net/netrom/nr_in.c b/net/netrom/nr_in.c index 5560acbaaa95..e6dc749e14be 100644 --- a/net/netrom/nr_in.c +++ b/net/netrom/nr_in.c | |||
@@ -51,7 +51,7 @@ static int nr_queue_rx_frame(struct sock *sk, struct sk_buff *skb, int more) | |||
51 | if ((skbn = alloc_skb(nr->fraglen, GFP_ATOMIC)) == NULL) | 51 | if ((skbn = alloc_skb(nr->fraglen, GFP_ATOMIC)) == NULL) |
52 | return 1; | 52 | return 1; |
53 | 53 | ||
54 | skbn->h.raw = skbn->data; | 54 | skb_reset_transport_header(skbn); |
55 | 55 | ||
56 | while ((skbo = skb_dequeue(&nr->frag_queue)) != NULL) { | 56 | while ((skbo = skb_dequeue(&nr->frag_queue)) != NULL) { |
57 | memcpy(skb_put(skbn, skbo->len), skbo->data, skbo->len); | 57 | memcpy(skb_put(skbn, skbo->len), skbo->data, skbo->len); |
diff --git a/net/netrom/nr_loopback.c b/net/netrom/nr_loopback.c index e856ae1b360a..99fdab16ded0 100644 --- a/net/netrom/nr_loopback.c +++ b/net/netrom/nr_loopback.c | |||
@@ -35,7 +35,7 @@ int nr_loopback_queue(struct sk_buff *skb) | |||
35 | 35 | ||
36 | if ((skbn = alloc_skb(skb->len, GFP_ATOMIC)) != NULL) { | 36 | if ((skbn = alloc_skb(skb->len, GFP_ATOMIC)) != NULL) { |
37 | memcpy(skb_put(skbn, skb->len), skb->data, skb->len); | 37 | memcpy(skb_put(skbn, skb->len), skb->data, skb->len); |
38 | skbn->h.raw = skbn->data; | 38 | skb_reset_transport_header(skbn); |
39 | 39 | ||
40 | skb_queue_tail(&loopback_queue, skbn); | 40 | skb_queue_tail(&loopback_queue, skbn); |
41 | 41 | ||
diff --git a/net/rose/af_rose.c b/net/rose/af_rose.c index f64be9369ef7..6d8684a11ac6 100644 --- a/net/rose/af_rose.c +++ b/net/rose/af_rose.c | |||
@@ -1234,7 +1234,7 @@ static int rose_recvmsg(struct kiocb *iocb, struct socket *sock, | |||
1234 | *asmptr = qbit; | 1234 | *asmptr = qbit; |
1235 | } | 1235 | } |
1236 | 1236 | ||
1237 | skb->h.raw = skb->data; | 1237 | skb_reset_transport_header(skb); |
1238 | copied = skb->len; | 1238 | copied = skb->len; |
1239 | 1239 | ||
1240 | if (copied > size) { | 1240 | if (copied > size) { |
diff --git a/net/rose/rose_loopback.c b/net/rose/rose_loopback.c index 3e41bd93ab9f..cd01642f0491 100644 --- a/net/rose/rose_loopback.c +++ b/net/rose/rose_loopback.c | |||
@@ -77,7 +77,7 @@ static void rose_loopback_timer(unsigned long param) | |||
77 | dest = (rose_address *)(skb->data + 4); | 77 | dest = (rose_address *)(skb->data + 4); |
78 | lci_o = 0xFFF - lci_i; | 78 | lci_o = 0xFFF - lci_i; |
79 | 79 | ||
80 | skb->h.raw = skb->data; | 80 | skb_reset_transport_header(skb); |
81 | 81 | ||
82 | sk = rose_find_socket(lci_o, &rose_loopback_neigh); | 82 | sk = rose_find_socket(lci_o, &rose_loopback_neigh); |
83 | if (sk) { | 83 | if (sk) { |
diff --git a/net/rose/rose_route.c b/net/rose/rose_route.c index a1233e1b1ab6..1f9aefd95a99 100644 --- a/net/rose/rose_route.c +++ b/net/rose/rose_route.c | |||
@@ -906,7 +906,7 @@ int rose_route_frame(struct sk_buff *skb, ax25_cb *ax25) | |||
906 | } | 906 | } |
907 | } | 907 | } |
908 | else { | 908 | else { |
909 | skb->h.raw = skb->data; | 909 | skb_reset_transport_header(skb); |
910 | res = rose_process_rx_frame(sk, skb); | 910 | res = rose_process_rx_frame(sk, skb); |
911 | goto out; | 911 | goto out; |
912 | } | 912 | } |
diff --git a/net/unix/af_unix.c b/net/unix/af_unix.c index 606971645b33..aec8cf165e1a 100644 --- a/net/unix/af_unix.c +++ b/net/unix/af_unix.c | |||
@@ -1319,7 +1319,7 @@ static int unix_dgram_sendmsg(struct kiocb *kiocb, struct socket *sock, | |||
1319 | unix_attach_fds(siocb->scm, skb); | 1319 | unix_attach_fds(siocb->scm, skb); |
1320 | unix_get_secdata(siocb->scm, skb); | 1320 | unix_get_secdata(siocb->scm, skb); |
1321 | 1321 | ||
1322 | skb->h.raw = skb->data; | 1322 | skb_reset_transport_header(skb); |
1323 | err = memcpy_fromiovec(skb_put(skb,len), msg->msg_iov, len); | 1323 | err = memcpy_fromiovec(skb_put(skb,len), msg->msg_iov, len); |
1324 | if (err) | 1324 | if (err) |
1325 | goto out_free; | 1325 | goto out_free; |
diff --git a/net/x25/af_x25.c b/net/x25/af_x25.c index a19884315622..fc713059ccdd 100644 --- a/net/x25/af_x25.c +++ b/net/x25/af_x25.c | |||
@@ -1210,8 +1210,7 @@ static int x25_recvmsg(struct kiocb *iocb, struct socket *sock, | |||
1210 | } | 1210 | } |
1211 | } | 1211 | } |
1212 | 1212 | ||
1213 | skb->h.raw = skb->data; | 1213 | skb_reset_transport_header(skb); |
1214 | |||
1215 | copied = skb->len; | 1214 | copied = skb->len; |
1216 | 1215 | ||
1217 | if (copied > size) { | 1216 | if (copied > size) { |
diff --git a/net/x25/x25_dev.c b/net/x25/x25_dev.c index 94fd12f3a909..848a6b6f90a6 100644 --- a/net/x25/x25_dev.c +++ b/net/x25/x25_dev.c | |||
@@ -48,7 +48,7 @@ static int x25_receive_data(struct sk_buff *skb, struct x25_neigh *nb) | |||
48 | if ((sk = x25_find_socket(lci, nb)) != NULL) { | 48 | if ((sk = x25_find_socket(lci, nb)) != NULL) { |
49 | int queued = 1; | 49 | int queued = 1; |
50 | 50 | ||
51 | skb->h.raw = skb->data; | 51 | skb_reset_transport_header(skb); |
52 | bh_lock_sock(sk); | 52 | bh_lock_sock(sk); |
53 | if (!sock_owned_by_user(sk)) { | 53 | if (!sock_owned_by_user(sk)) { |
54 | queued = x25_process_rx_frame(sk, skb); | 54 | queued = x25_process_rx_frame(sk, skb); |
diff --git a/net/x25/x25_in.c b/net/x25/x25_in.c index c5239fcdefa0..b2bbe552a89d 100644 --- a/net/x25/x25_in.c +++ b/net/x25/x25_in.c | |||
@@ -53,7 +53,7 @@ static int x25_queue_rx_frame(struct sock *sk, struct sk_buff *skb, int more) | |||
53 | 53 | ||
54 | skb_queue_tail(&x25->fragment_queue, skb); | 54 | skb_queue_tail(&x25->fragment_queue, skb); |
55 | 55 | ||
56 | skbn->h.raw = skbn->data; | 56 | skb_reset_transport_header(skbn); |
57 | 57 | ||
58 | skbo = skb_dequeue(&x25->fragment_queue); | 58 | skbo = skb_dequeue(&x25->fragment_queue); |
59 | memcpy(skb_put(skbn, skbo->len), skbo->data, skbo->len); | 59 | memcpy(skb_put(skbn, skbo->len), skbo->data, skbo->len); |