From 2f41e2b0ec6bc13adfdb0f291167762a4b360cfb Mon Sep 17 00:00:00 2001 From: christiaans Date: Wed, 1 Nov 2006 09:33:14 +0000 Subject: [PATCH] Made ip_id static again, fixing bug #18065. This is required when outputting IP fragments. --- src/core/ipv4/ip.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/core/ipv4/ip.c b/src/core/ipv4/ip.c index ee54d9a9..9d655f8b 100644 --- a/src/core/ipv4/ip.c +++ b/src/core/ipv4/ip.c @@ -375,6 +375,9 @@ ip_input(struct pbuf *p, struct netif *inp) { * the IP header and calculates the IP header checksum. If the source * IP address is NULL, the IP address of the outgoing network * interface is filled in as source address. + * + * @note ip_id: RFC791 "some host may be able to simply use + * unique identifiers independent of destination" */ err_t @@ -383,7 +386,7 @@ ip_output_if(struct pbuf *p, struct ip_addr *src, struct ip_addr *dest, u8_t proto, struct netif *netif) { struct ip_hdr *iphdr; - u16_t ip_id = 0; + static u16_t ip_id = 0; snmp_inc_ipoutrequests();