summaryrefslogtreecommitdiff
path: root/net/ipv4
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2007-04-10 21:21:55 -0700
committerDavid S. Miller <davem@sunset.davemloft.net>2007-04-25 22:26:20 -0700
commitb0e380b1d8a8e0aca215df97702f99815f05c094 (patch)
tree95f402ca155f5211150178811669ebf0a88e8e00 /net/ipv4
parentcfe1fc7759fdacb0c650b575daed1692bf3eaece (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>
Diffstat (limited to 'net/ipv4')
-rw-r--r--net/ipv4/ah4.c4
-rw-r--r--net/ipv4/igmp.c2
-rw-r--r--net/ipv4/ip_gre.c2
-rw-r--r--net/ipv4/ip_output.c11
-rw-r--r--net/ipv4/ipcomp.c2
-rw-r--r--net/ipv4/ipip.c4
-rw-r--r--net/ipv4/ipmr.c8
-rw-r--r--net/ipv4/ipvs/ip_vs_xmit.c4
-rw-r--r--net/ipv4/netfilter/ipt_LOG.c2
-rw-r--r--net/ipv4/netfilter/ipt_ULOG.c2
-rw-r--r--net/ipv4/raw.c2
-rw-r--r--net/ipv4/xfrm4_mode_beet.c4
-rw-r--r--net/ipv4/xfrm4_mode_transport.c8
-rw-r--r--net/ipv4/xfrm4_mode_tunnel.c2
14 files changed, 28 insertions, 29 deletions
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)
}
}
((struct iphdr*)work_buf)->protocol = ah->nexthdr;
- skb->nh.raw += ah_hlen;
+ skb->network_header += ah_hlen;
memcpy(skb_network_header(skb), work_buf, ihl);
- skb->h.raw = skb->nh.raw;
+ skb->transport_header = skb->network_header;
__skb_pull(skb, ah_hlen + ihl);
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)
((u8*)&pip[1])[2] = 0;
((u8*)&pip[1])[3] = 0;
- skb->h.raw = skb->nh.raw + sizeof(struct iphdr) + 4;
+ skb->transport_header = skb->network_header + sizeof(struct iphdr) + 4;
skb_put(skb, sizeof(*pig));
pig = igmpv3_report_hdr(skb);
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)
old_iph = ip_hdr(skb);
}
- skb->h.raw = skb->nh.raw;
+ skb->transport_header = skb->network_header;
skb_push(skb, gre_hlen);
skb_reset_network_header(skb);
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:
skb_reserve(skb2, ll_rs);
skb_put(skb2, len + hlen);
skb_reset_network_header(skb2);
- skb2->h.raw = skb2->nh.raw + hlen;
+ skb2->transport_header = skb2->network_header + hlen;
/*
* Charge the memory for the fragment to any owner
@@ -713,7 +713,7 @@ static inline int ip_ufo_append_data(struct sock *sk,
skb_reset_network_header(skb);
/* initialize protocol header pointer */
- skb->h.raw = skb->nh.raw + fragheaderlen;
+ skb->transport_header = skb->network_header + fragheaderlen;
skb->ip_summed = CHECKSUM_PARTIAL;
skb->csum = 0;
@@ -918,7 +918,8 @@ alloc_new_skb:
*/
data = skb_put(skb, fraglen);
skb_set_network_header(skb, exthdrlen);
- skb->h.raw = skb->nh.raw + fragheaderlen;
+ skb->transport_header = (skb->network_header +
+ fragheaderlen);
data += fragheaderlen;
if (fraggap) {
@@ -1112,8 +1113,8 @@ ssize_t ip_append_page(struct sock *sk, struct page *page,
*/
skb_put(skb, fragheaderlen + fraggap);
skb_reset_network_header(skb);
- skb->h.raw = skb->nh.raw + fragheaderlen;
-
+ skb->transport_header = (skb->network_header +
+ fragheaderlen);
if (fraggap) {
skb->csum = skb_copy_and_csum_bits(skb_prev,
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)
iph = ip_hdr(skb);
ipch = (void *)skb->data;
iph->protocol = ipch->nexthdr;
- skb->h.raw = skb->nh.raw + sizeof(*ipch);
+ skb->transport_header = skb->network_header + sizeof(*ipch);
__skb_pull(skb, sizeof(*ipch));
err = ipcomp_decompress(x, skb);
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)
secpath_reset(skb);
- skb->mac.raw = skb->nh.raw;
+ skb->mac_header = skb->network_header;
skb_reset_network_header(skb);
skb->protocol = htons(ETH_P_IP);
skb->pkt_type = PACKET_HOST;
@@ -617,7 +617,7 @@ static int ipip_tunnel_xmit(struct sk_buff *skb, struct net_device *dev)
old_iph = ip_hdr(skb);
}
- skb->h.raw = skb->nh.raw;
+ skb->transport_header = skb->network_header;
skb_push(skb, sizeof(struct iphdr));
skb_reset_network_header(skb);
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)
msg->im_msgtype = assert;
igmp->code = 0;
ip_hdr(skb)->tot_len = htons(skb->len); /* Fix the length */
- skb->h.raw = skb->nh.raw;
+ skb->transport_header = skb->network_header;
}
if (mroute_socket == NULL) {
@@ -1102,7 +1102,7 @@ static void ip_encap(struct sk_buff *skb, __be32 saddr, __be32 daddr)
struct iphdr *old_iph = ip_hdr(skb);
skb_push(skb, sizeof(struct iphdr));
- skb->h.raw = skb->nh.raw;
+ skb->transport_header = skb->network_header;
skb_reset_network_header(skb);
iph = ip_hdr(skb);
@@ -1461,7 +1461,7 @@ int pim_rcv_v1(struct sk_buff * skb)
if (reg_dev == NULL)
goto drop;
- skb->mac.raw = skb->nh.raw;
+ skb->mac_header = skb->network_header;
skb_pull(skb, (u8*)encap - skb->data);
skb_reset_network_header(skb);
skb->dev = reg_dev;
@@ -1517,7 +1517,7 @@ static int pim_rcv(struct sk_buff * skb)
if (reg_dev == NULL)
goto drop;
- skb->mac.raw = skb->nh.raw;
+ skb->mac_header = skb->network_header;
skb_pull(skb, (u8*)encap - skb->data);
skb_reset_network_header(skb);
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,
struct iphdr *old_iph = ip_hdr(skb);
u8 tos = old_iph->tos;
__be16 df = old_iph->frag_off;
- unsigned char *old_h = skb_transport_header(skb);
+ unsigned char *old_transport_header = skb->transport_header;
struct iphdr *iph; /* Our new IP header */
int max_headroom; /* The extra header space needed */
int mtu;
@@ -381,7 +381,7 @@ ip_vs_tunnel_xmit(struct sk_buff *skb, struct ip_vs_conn *cp,
old_iph = ip_hdr(skb);
}
- skb->h.raw = old_h;
+ skb->transport_header = old_transport_header;
/* fix old IP header checksum */
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,
/* MAC logging for input chain only. */
printk("MAC=");
if (skb->dev && skb->dev->hard_header_len
- && skb->mac.raw != skb->nh.raw) {
+ && skb->mac_header != skb->network_header) {
int i;
const unsigned char *p = skb_mac_header(skb);
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,
*(pm->prefix) = '\0';
if (in && in->hard_header_len > 0
- && skb->mac.raw != skb->nh.raw
+ && skb->mac_header != skb->network_header
&& in->hard_header_len <= ULOG_MAC_LEN) {
memcpy(pm->mac, skb_mac_header(skb), in->hard_header_len);
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,
skb->ip_summed = CHECKSUM_NONE;
- skb->h.raw = skb->nh.raw;
+ skb->transport_header = skb->network_header;
err = memcpy_fromiovecend((void *)iph, from, 0, length);
if (err)
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)
int hdrlen, optlen;
iph = ip_hdr(skb);
- skb->h.raw = skb->nh.raw;
+ skb->transport_header = skb->network_header;
hdrlen = 0;
optlen = iph->ihl * 4 - sizeof(*iph);
@@ -43,7 +43,7 @@ static int xfrm4_beet_output(struct xfrm_state *x, struct sk_buff *skb)
skb_push(skb, x->props.header_len + hdrlen);
skb_reset_network_header(skb);
top_iph = ip_hdr(skb);
- skb->h.raw += sizeof(*iph) - hdrlen;
+ skb->transport_header += sizeof(*iph) - hdrlen;
memmove(top_iph, iph, sizeof(*iph));
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)
struct iphdr *iph = ip_hdr(skb);
int ihl = iph->ihl * 4;
- skb->h.raw = skb->nh.raw;
- skb->h.raw += ihl;
-
+ skb->transport_header = skb->network_header + ihl;
skb_push(skb, x->props.header_len);
skb_reset_network_header(skb);
memmove(skb_network_header(skb), iph, ihl);
@@ -47,10 +45,10 @@ static int xfrm4_transport_input(struct xfrm_state *x, struct sk_buff *skb)
{
int ihl = skb->data - skb_transport_header(skb);
- if (skb->h.raw != skb->nh.raw) {
+ if (skb->transport_header != skb->network_header) {
memmove(skb_transport_header(skb),
skb_network_header(skb), ihl);
- skb->nh.raw = skb->h.raw;
+ skb->network_header = skb->transport_header;
}
ip_hdr(skb)->tot_len = htons(skb->len + ihl);
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)
int flags;
iph = ip_hdr(skb);
- skb->h.raw = skb->nh.raw;
+ skb->transport_header = skb->network_header;
skb_push(skb, x->props.header_len);
skb_reset_network_header(skb);