aboutsummaryrefslogtreecommitdiffstats
path: root/net/core
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2007-03-13 13:28:48 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2007-04-26 01:25:22 -0400
commit4bedb45203eab92a87b4c863fe2d0cded633427f (patch)
treed46e43d0a08253cf85ee2db64df6aee5e4ff5a07 /net/core
parentd9edf9e2be0f7661558984c32bd53867a7037fd3 (diff)
[SK_BUFF]: Introduce udp_hdr(), remove skb->h.uh
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core')
-rw-r--r--net/core/netpoll.c4
-rw-r--r--net/core/pktgen.c4
2 files changed, 5 insertions, 3 deletions
diff --git a/net/core/netpoll.c b/net/core/netpoll.c
index 8b22723d643..57a82445c46 100644
--- a/net/core/netpoll.c
+++ b/net/core/netpoll.c
@@ -296,7 +296,9 @@ void netpoll_send_udp(struct netpoll *np, const char *msg, int len)
296 memcpy(skb->data, msg, len); 296 memcpy(skb->data, msg, len);
297 skb->len += len; 297 skb->len += len;
298 298
299 skb->h.uh = udph = (struct udphdr *) skb_push(skb, sizeof(*udph)); 299 skb_push(skb, sizeof(*udph));
300 skb_reset_transport_header(skb);
301 udph = udp_hdr(skb);
300 udph->source = htons(np->local_port); 302 udph->source = htons(np->local_port);
301 udph->dest = htons(np->remote_port); 303 udph->dest = htons(np->remote_port);
302 udph->len = htons(udp_len); 304 udph->len = htons(udp_len);
diff --git a/net/core/pktgen.c b/net/core/pktgen.c
index ee82364c8f3..160d4f01c46 100644
--- a/net/core/pktgen.c
+++ b/net/core/pktgen.c
@@ -2392,7 +2392,7 @@ static struct sk_buff *fill_packet_ipv4(struct net_device *odev,
2392 skb->dev = odev; 2392 skb->dev = odev;
2393 skb->pkt_type = PACKET_HOST; 2393 skb->pkt_type = PACKET_HOST;
2394 skb->nh.raw = (unsigned char *)iph; 2394 skb->nh.raw = (unsigned char *)iph;
2395 skb->h.uh = udph; 2395 skb->h.raw = (unsigned char *)udph;
2396 2396
2397 if (pkt_dev->nfrags <= 0) 2397 if (pkt_dev->nfrags <= 0)
2398 pgh = (struct pktgen_hdr *)skb_put(skb, datalen); 2398 pgh = (struct pktgen_hdr *)skb_put(skb, datalen);
@@ -2737,7 +2737,7 @@ static struct sk_buff *fill_packet_ipv6(struct net_device *odev,
2737 skb->dev = odev; 2737 skb->dev = odev;
2738 skb->pkt_type = PACKET_HOST; 2738 skb->pkt_type = PACKET_HOST;
2739 skb->nh.raw = (unsigned char *)iph; 2739 skb->nh.raw = (unsigned char *)iph;
2740 skb->h.uh = udph; 2740 skb->h.raw = (unsigned char *)udph;
2741 2741
2742 if (pkt_dev->nfrags <= 0) 2742 if (pkt_dev->nfrags <= 0)
2743 pgh = (struct pktgen_hdr *)skb_put(skb, datalen); 2743 pgh = (struct pktgen_hdr *)skb_put(skb, datalen);