diff options
Diffstat (limited to 'net/ipv4')
-rw-r--r-- | net/ipv4/netfilter/ipt_CLUSTERIP.c | 5 | ||||
-rw-r--r-- | net/ipv4/netfilter/ipt_recent.c | 2 | ||||
-rw-r--r-- | net/ipv4/proc.c | 2 | ||||
-rw-r--r-- | net/ipv4/route.c | 4 | ||||
-rw-r--r-- | net/ipv4/tcp_ipv4.c | 14 |
5 files changed, 13 insertions, 14 deletions
diff --git a/net/ipv4/netfilter/ipt_CLUSTERIP.c b/net/ipv4/netfilter/ipt_CLUSTERIP.c index 1819ad7ab910..fafe8ebb4c55 100644 --- a/net/ipv4/netfilter/ipt_CLUSTERIP.c +++ b/net/ipv4/netfilter/ipt_CLUSTERIP.c | |||
@@ -475,11 +475,10 @@ static void arp_print(struct arp_payload *payload) | |||
475 | #define HBUFFERLEN 30 | 475 | #define HBUFFERLEN 30 |
476 | char hbuffer[HBUFFERLEN]; | 476 | char hbuffer[HBUFFERLEN]; |
477 | int j,k; | 477 | int j,k; |
478 | const char hexbuf[]= "0123456789abcdef"; | ||
479 | 478 | ||
480 | for (k=0, j=0; k < HBUFFERLEN-3 && j < ETH_ALEN; j++) { | 479 | for (k=0, j=0; k < HBUFFERLEN-3 && j < ETH_ALEN; j++) { |
481 | hbuffer[k++]=hexbuf[(payload->src_hw[j]>>4)&15]; | 480 | hbuffer[k++] = hex_asc_hi(payload->src_hw[j]); |
482 | hbuffer[k++]=hexbuf[payload->src_hw[j]&15]; | 481 | hbuffer[k++] = hex_asc_lo(payload->src_hw[j]); |
483 | hbuffer[k++]=':'; | 482 | hbuffer[k++]=':'; |
484 | } | 483 | } |
485 | hbuffer[--k]='\0'; | 484 | hbuffer[--k]='\0'; |
diff --git a/net/ipv4/netfilter/ipt_recent.c b/net/ipv4/netfilter/ipt_recent.c index 21cb053f5d7d..3974d7cae5c0 100644 --- a/net/ipv4/netfilter/ipt_recent.c +++ b/net/ipv4/netfilter/ipt_recent.c | |||
@@ -305,10 +305,10 @@ static void recent_mt_destroy(const struct xt_match *match, void *matchinfo) | |||
305 | spin_lock_bh(&recent_lock); | 305 | spin_lock_bh(&recent_lock); |
306 | list_del(&t->list); | 306 | list_del(&t->list); |
307 | spin_unlock_bh(&recent_lock); | 307 | spin_unlock_bh(&recent_lock); |
308 | recent_table_flush(t); | ||
309 | #ifdef CONFIG_PROC_FS | 308 | #ifdef CONFIG_PROC_FS |
310 | remove_proc_entry(t->name, proc_dir); | 309 | remove_proc_entry(t->name, proc_dir); |
311 | #endif | 310 | #endif |
311 | recent_table_flush(t); | ||
312 | kfree(t); | 312 | kfree(t); |
313 | } | 313 | } |
314 | mutex_unlock(&recent_mutex); | 314 | mutex_unlock(&recent_mutex); |
diff --git a/net/ipv4/proc.c b/net/ipv4/proc.c index 834356ea99df..8f5a403f6f6b 100644 --- a/net/ipv4/proc.c +++ b/net/ipv4/proc.c | |||
@@ -232,6 +232,8 @@ static const struct snmp_mib snmp4_net_list[] = { | |||
232 | SNMP_MIB_ITEM("TCPDSACKIgnoredOld", LINUX_MIB_TCPDSACKIGNOREDOLD), | 232 | SNMP_MIB_ITEM("TCPDSACKIgnoredOld", LINUX_MIB_TCPDSACKIGNOREDOLD), |
233 | SNMP_MIB_ITEM("TCPDSACKIgnoredNoUndo", LINUX_MIB_TCPDSACKIGNOREDNOUNDO), | 233 | SNMP_MIB_ITEM("TCPDSACKIgnoredNoUndo", LINUX_MIB_TCPDSACKIGNOREDNOUNDO), |
234 | SNMP_MIB_ITEM("TCPSpuriousRTOs", LINUX_MIB_TCPSPURIOUSRTOS), | 234 | SNMP_MIB_ITEM("TCPSpuriousRTOs", LINUX_MIB_TCPSPURIOUSRTOS), |
235 | SNMP_MIB_ITEM("TCPMD5NotFound", LINUX_MIB_TCPMD5NOTFOUND), | ||
236 | SNMP_MIB_ITEM("TCPMD5Unexpected", LINUX_MIB_TCPMD5UNEXPECTED), | ||
235 | SNMP_MIB_SENTINEL | 237 | SNMP_MIB_SENTINEL |
236 | }; | 238 | }; |
237 | 239 | ||
diff --git a/net/ipv4/route.c b/net/ipv4/route.c index 380d6474cf66..1bfa078ddbd0 100644 --- a/net/ipv4/route.c +++ b/net/ipv4/route.c | |||
@@ -3216,14 +3216,18 @@ int __init ip_rt_init(void) | |||
3216 | return rc; | 3216 | return rc; |
3217 | } | 3217 | } |
3218 | 3218 | ||
3219 | #ifdef CONFIG_SYSCTL | ||
3219 | /* | 3220 | /* |
3220 | * We really need to sanitize the damn ipv4 init order, then all | 3221 | * We really need to sanitize the damn ipv4 init order, then all |
3221 | * this nonsense will go away. | 3222 | * this nonsense will go away. |
3222 | */ | 3223 | */ |
3223 | void __init ip_static_sysctl_init(void) | 3224 | void __init ip_static_sysctl_init(void) |
3224 | { | 3225 | { |
3226 | #ifdef CONFIG_SYSCTL | ||
3225 | register_sysctl_paths(ipv4_route_path, ipv4_route_table); | 3227 | register_sysctl_paths(ipv4_route_path, ipv4_route_table); |
3228 | #endif | ||
3226 | } | 3229 | } |
3230 | #endif | ||
3227 | 3231 | ||
3228 | EXPORT_SYMBOL(__ip_select_ident); | 3232 | EXPORT_SYMBOL(__ip_select_ident); |
3229 | EXPORT_SYMBOL(ip_route_input); | 3233 | EXPORT_SYMBOL(ip_route_input); |
diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c index a2b06d0cc26b..91a8cfddf1c4 100644 --- a/net/ipv4/tcp_ipv4.c +++ b/net/ipv4/tcp_ipv4.c | |||
@@ -655,8 +655,8 @@ static void tcp_v4_send_ack(struct sk_buff *skb, u32 seq, u32 ack, | |||
655 | rep.th.doff = arg.iov[0].iov_len/4; | 655 | rep.th.doff = arg.iov[0].iov_len/4; |
656 | 656 | ||
657 | tcp_v4_md5_hash_hdr((__u8 *) &rep.opt[offset], | 657 | tcp_v4_md5_hash_hdr((__u8 *) &rep.opt[offset], |
658 | key, ip_hdr(skb)->daddr, | 658 | key, ip_hdr(skb)->saddr, |
659 | ip_hdr(skb)->saddr, &rep.th); | 659 | ip_hdr(skb)->daddr, &rep.th); |
660 | } | 660 | } |
661 | #endif | 661 | #endif |
662 | arg.csum = csum_tcpudp_nofold(ip_hdr(skb)->daddr, | 662 | arg.csum = csum_tcpudp_nofold(ip_hdr(skb)->daddr, |
@@ -1116,18 +1116,12 @@ static int tcp_v4_inbound_md5_hash(struct sock *sk, struct sk_buff *skb) | |||
1116 | return 0; | 1116 | return 0; |
1117 | 1117 | ||
1118 | if (hash_expected && !hash_location) { | 1118 | if (hash_expected && !hash_location) { |
1119 | LIMIT_NETDEBUG(KERN_INFO "MD5 Hash expected but NOT found " | 1119 | NET_INC_STATS_BH(sock_net(sk), LINUX_MIB_TCPMD5NOTFOUND); |
1120 | "(" NIPQUAD_FMT ", %d)->(" NIPQUAD_FMT ", %d)\n", | ||
1121 | NIPQUAD(iph->saddr), ntohs(th->source), | ||
1122 | NIPQUAD(iph->daddr), ntohs(th->dest)); | ||
1123 | return 1; | 1120 | return 1; |
1124 | } | 1121 | } |
1125 | 1122 | ||
1126 | if (!hash_expected && hash_location) { | 1123 | if (!hash_expected && hash_location) { |
1127 | LIMIT_NETDEBUG(KERN_INFO "MD5 Hash NOT expected but found " | 1124 | NET_INC_STATS_BH(sock_net(sk), LINUX_MIB_TCPMD5UNEXPECTED); |
1128 | "(" NIPQUAD_FMT ", %d)->(" NIPQUAD_FMT ", %d)\n", | ||
1129 | NIPQUAD(iph->saddr), ntohs(th->source), | ||
1130 | NIPQUAD(iph->daddr), ntohs(th->dest)); | ||
1131 | return 1; | 1125 | return 1; |
1132 | } | 1126 | } |
1133 | 1127 | ||