aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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)
388 struct udphdr *udph; 388 struct udphdr *udph;
389 struct iphdr *iph; 389 struct iphdr *iph;
390 struct ethhdr *eth; 390 struct ethhdr *eth;
391 static atomic_t ip_ident;
391 392
392 udp_len = len + sizeof(*udph); 393 udp_len = len + sizeof(*udph);
393 ip_len = udp_len + sizeof(*iph); 394 ip_len = udp_len + sizeof(*iph);
@@ -423,7 +424,7 @@ void netpoll_send_udp(struct netpoll *np, const char *msg, int len)
423 put_unaligned(0x45, (unsigned char *)iph); 424 put_unaligned(0x45, (unsigned char *)iph);
424 iph->tos = 0; 425 iph->tos = 0;
425 put_unaligned(htons(ip_len), &(iph->tot_len)); 426 put_unaligned(htons(ip_len), &(iph->tot_len));
426 iph->id = 0; 427 iph->id = htons(atomic_inc_return(&ip_ident));
427 iph->frag_off = 0; 428 iph->frag_off = 0;
428 iph->ttl = 64; 429 iph->ttl = 64;
429 iph->protocol = IPPROTO_UDP; 430 iph->protocol = IPPROTO_UDP;