summaryrefslogtreecommitdiffstats
path: root/net/core/netpoll.c
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2012-08-24 01:47:26 +0000
committerDavid S. Miller <davem@davemloft.net>2012-08-30 12:32:14 -0400
commitee13040901c11b016d996ab5a946acaaa3461737 (patch)
treea2665e1b0605559d28dc0ed30866491272f8d753 /net/core/netpoll.c
parent6549dd43c04327071571edf7aea4465b16539422 (diff)
downloadblackbird-op-linux-ee13040901c11b016d996ab5a946acaaa3461737.tar.gz
blackbird-op-linux-ee13040901c11b016d996ab5a946acaaa3461737.zip
netpoll: provide an IP ident in UDP frames
Let's fill IP header ident field with a meaningful value, it might help some setups. Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core/netpoll.c')
-rw-r--r--net/core/netpoll.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/core/netpoll.c b/net/core/netpoll.c
index 346b1eb83a1f..5af9c2692506 100644
--- a/net/core/netpoll.c
+++ b/net/core/netpoll.c
@@ -388,6 +388,7 @@ void netpoll_send_udp(struct netpoll *np, const char *msg, int len)
struct udphdr *udph;
struct iphdr *iph;
struct ethhdr *eth;
+ static atomic_t ip_ident;
udp_len = len + sizeof(*udph);
ip_len = udp_len + sizeof(*iph);
@@ -423,7 +424,7 @@ void netpoll_send_udp(struct netpoll *np, const char *msg, int len)
put_unaligned(0x45, (unsigned char *)iph);
iph->tos = 0;
put_unaligned(htons(ip_len), &(iph->tot_len));
- iph->id = 0;
+ iph->id = htons(atomic_inc_return(&ip_ident));
iph->frag_off = 0;
iph->ttl = 64;
iph->protocol = IPPROTO_UDP;
OpenPOWER on IntegriCloud