Changeset 50189 in vbox
- Timestamp:
- Jan 23, 2014 4:55:24 PM (11 years ago)
- Location:
- trunk/src/VBox/Devices/Network/lwip-new
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Network/lwip-new/CHANGELOG
r50185 r50189 6 6 7 7 ++ New features: 8 9 2014-01-17: Jiri Engelthaler 10 * icmp, icmp6, opt.h: patch #8027: Completed HW checksuming for IPv4 and 11 IPv6 ICMP's 8 12 9 13 2012-03-25: Simon Goldschmidt (idea by Mason) -
trunk/src/VBox/Devices/Network/lwip-new/src/core/ipv4/icmp.c
r49854 r50189 146 146 goto lenerr; 147 147 } 148 #if CHECKSUM_CHECK_ICMP 148 149 if (inet_chksum_pbuf(p) != 0) { 149 150 LWIP_DEBUGF(ICMP_DEBUG, ("icmp_input: checksum failed for received ICMP echo\n")); … … 153 154 return; 154 155 } 156 #endif 155 157 #if LWIP_ICMP_ECHO_CHECK_INPUT_PBUF_LEN 156 158 if (pbuf_header(p, (PBUF_IP_HLEN + PBUF_LINK_HLEN))) { … … 428 430 /* calculate checksum */ 429 431 icmphdr->chksum = 0; 432 #if CHECKSUM_GEN_ICMP 430 433 icmphdr->chksum = inet_chksum(icmphdr, q->len); 434 #endif 431 435 ICMP_STATS_INC(icmp.xmit); 432 436 /* increase number of messages attempted to send */ -
trunk/src/VBox/Devices/Network/lwip-new/src/core/ipv4/ip_frag.c
r47886 r50189 580 580 IPH_CHKSUM_SET(fraghdr, 0); 581 581 /* @todo: do we need to set calculate the correct checksum? */ 582 #if CHECKSUM_GEN_IP 582 583 IPH_CHKSUM_SET(fraghdr, inet_chksum(fraghdr, IP_HLEN)); 584 #endif /* CHECKSUM_GEN_IP */ 583 585 584 586 p = ipr->p; … … 812 814 IPH_LEN_SET(iphdr, htons(cop + IP_HLEN)); 813 815 IPH_CHKSUM_SET(iphdr, 0); 816 #if CHECKSUM_GEN_IP 814 817 IPH_CHKSUM_SET(iphdr, inet_chksum(iphdr, IP_HLEN)); 818 #endif /* CHECKSUM_GEN_IP */ 815 819 816 820 #if IP_FRAG_USES_STATIC_BUF -
trunk/src/VBox/Devices/Network/lwip-new/src/core/ipv6/icmp6.c
r49592 r50189 102 102 icmp6hdr = (struct icmp6_hdr *)p->payload; 103 103 104 #if LWIP_ICMP6_CHECKSUM_CHECK104 #if CHECKSUM_CHECK_ICMP6 105 105 if (ip6_chksum_pseudo(p, IP6_NEXTH_ICMP6, p->tot_len, ip6_current_src_addr(), 106 106 ip6_current_dest_addr()) != 0) { … … 111 111 return; 112 112 } 113 #endif /* LWIP_ICMP6_CHECKSUM_CHECK*/113 #endif /* CHECKSUM_CHECK_ICMP6 */ 114 114 115 115 switch (icmp6hdr->type) { … … 185 185 ((struct icmp6_echo_hdr *)(r->payload))->type = ICMP6_TYPE_EREP; 186 186 ((struct icmp6_echo_hdr *)(r->payload))->chksum = 0; 187 #if CHECKSUM_GEN_ICMP6 187 188 ((struct icmp6_echo_hdr *)(r->payload))->chksum = ip6_chksum_pseudo(r, 188 189 IP6_NEXTH_ICMP6, r->tot_len, reply_src, ip6_current_src_addr()); 190 #endif /* CHECKSUM_GEN_ICMP6 */ 189 191 190 192 /* Send reply. */ … … 395 397 /* calculate checksum */ 396 398 icmp6hdr->chksum = 0; 399 #if CHECKSUM_GEN_ICMP6 397 400 icmp6hdr->chksum = ip6_chksum_pseudo(q, IP6_NEXTH_ICMP6, q->tot_len, 398 401 reply_src, reply_dest); 402 #endif /* CHECKSUM_GEN_ICMP6 */ 399 403 400 404 ICMP6_STATS_INC(icmp6.xmit); -
trunk/src/VBox/Devices/Network/lwip-new/src/core/ipv6/mld6.c
r47886 r50189 567 567 ip6_addr_set(&(mld_hdr->multicast_address), &(group->group_address)); 568 568 569 #if CHECKSUM_GEN_ICMP6 569 570 mld_hdr->chksum = ip6_chksum_pseudo(p, IP6_NEXTH_ICMP6, p->len, 570 571 src_addr, &(group->group_address)); 572 #endif /* CHECKSUM_GEN_ICMP6 */ 571 573 572 574 /* Add hop-by-hop headers options: router alert with MLD value. */ -
trunk/src/VBox/Devices/Network/lwip-new/src/core/ipv6/nd6.c
r47886 r50189 889 889 } 890 890 891 #if CHECKSUM_GEN_ICMP6 891 892 ns_hdr->chksum = ip6_chksum_pseudo(p, IP6_NEXTH_ICMP6, p->len, src_addr, 892 893 target_addr); 894 #endif /* CHECKSUM_GEN_ICMP6 */ 893 895 894 896 /* Send the packet out. */ … … 961 963 } 962 964 965 #if CHECKSUM_GEN_ICMP6 963 966 na_hdr->chksum = ip6_chksum_pseudo(p, IP6_NEXTH_ICMP6, p->len, src_addr, 964 967 dest_addr); 968 #endif /* CHECKSUM_GEN_ICMP6 */ 965 969 966 970 /* Send the packet out. */ … … 1028 1032 } 1029 1033 1034 #if CHECKSUM_GEN_ICMP6 1030 1035 rs_hdr->chksum = ip6_chksum_pseudo(p, IP6_NEXTH_ICMP6, p->len, src_addr, 1031 1036 &multicast_address); 1037 #endif /* CHECKSUM_GEN_ICMP6 */ 1032 1038 1033 1039 /* Send the packet out. */ -
trunk/src/VBox/Devices/Network/lwip-new/src/include/lwip/opt.h
r47886 r50189 1882 1882 1883 1883 /** 1884 * CHECKSUM_GEN_ICMP6==1: Generate checksums in software for outgoing ICMP6 packets. 1885 */ 1886 #ifndef CHECKSUM_GEN_ICMP6 1887 #define CHECKSUM_GEN_ICMP6 1 1888 #endif 1889 1890 /** 1884 1891 * CHECKSUM_CHECK_IP==1: Check checksums in software for incoming IP packets. 1885 1892 */ … … 1900 1907 #ifndef CHECKSUM_CHECK_TCP 1901 1908 #define CHECKSUM_CHECK_TCP 1 1909 #endif 1910 1911 /** 1912 * CHECKSUM_CHECK_ICMP==1: Check checksums in software for incoming ICMP packets. 1913 */ 1914 #ifndef CHECKSUM_CHECK_ICMP 1915 #define CHECKSUM_CHECK_ICMP 1 1916 #endif 1917 1918 /** 1919 * CHECKSUM_CHECK_ICMP6==1: Check checksums in software for incoming ICMPv6 packets 1920 */ 1921 #ifndef CHECKSUM_CHECK_ICMP6 1922 #define CHECKSUM_CHECK_ICMP6 1 1902 1923 #endif 1903 1924 … … 1956 1977 #ifndef LWIP_ICMP6_HL 1957 1978 #define LWIP_ICMP6_HL 255 1958 #endif1959 1960 /**1961 * LWIP_ICMP6_CHECKSUM_CHECK==1: verify checksum on ICMPv6 packets1962 */1963 #ifndef LWIP_ICMP6_CHECKSUM_CHECK1964 #define LWIP_ICMP6_CHECKSUM_CHECK 11965 1979 #endif 1966 1980
Note:
See TracChangeset
for help on using the changeset viewer.