aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipv4')
-rw-r--r--net/ipv4/af_inet.c2
-rw-r--r--net/ipv4/esp4.c2
-rw-r--r--net/ipv4/ip_sockglue.c2
-rw-r--r--net/ipv4/ipconfig.c9
4 files changed, 8 insertions, 7 deletions
diff --git a/net/ipv4/af_inet.c b/net/ipv4/af_inet.c
index 09ca5293d08f..0d109504ed86 100644
--- a/net/ipv4/af_inet.c
+++ b/net/ipv4/af_inet.c
@@ -458,7 +458,7 @@ int inet_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len)
458 err = -EADDRNOTAVAIL; 458 err = -EADDRNOTAVAIL;
459 if (!sysctl_ip_nonlocal_bind && 459 if (!sysctl_ip_nonlocal_bind &&
460 !inet->freebind && 460 !inet->freebind &&
461 addr->sin_addr.s_addr != INADDR_ANY && 461 addr->sin_addr.s_addr != htonl(INADDR_ANY) &&
462 chk_addr_ret != RTN_LOCAL && 462 chk_addr_ret != RTN_LOCAL &&
463 chk_addr_ret != RTN_MULTICAST && 463 chk_addr_ret != RTN_MULTICAST &&
464 chk_addr_ret != RTN_BROADCAST) 464 chk_addr_ret != RTN_BROADCAST)
diff --git a/net/ipv4/esp4.c b/net/ipv4/esp4.c
index 091e6709f831..f3ceca31aa45 100644
--- a/net/ipv4/esp4.c
+++ b/net/ipv4/esp4.c
@@ -168,7 +168,7 @@ static int esp_output(struct xfrm_state *x, struct sk_buff *skb)
168 struct xfrm_encap_tmpl *encap = x->encap; 168 struct xfrm_encap_tmpl *encap = x->encap;
169 struct udphdr *uh; 169 struct udphdr *uh;
170 __be32 *udpdata32; 170 __be32 *udpdata32;
171 unsigned int sport, dport; 171 __be16 sport, dport;
172 int encap_type; 172 int encap_type;
173 173
174 spin_lock_bh(&x->lock); 174 spin_lock_bh(&x->lock);
diff --git a/net/ipv4/ip_sockglue.c b/net/ipv4/ip_sockglue.c
index de0572c88859..f72457b4b0a7 100644
--- a/net/ipv4/ip_sockglue.c
+++ b/net/ipv4/ip_sockglue.c
@@ -583,7 +583,7 @@ static int do_ip_setsockopt(struct sock *sk, int level,
583 } 583 }
584 584
585 if (!mreq.imr_ifindex) { 585 if (!mreq.imr_ifindex) {
586 if (mreq.imr_address.s_addr == INADDR_ANY) { 586 if (mreq.imr_address.s_addr == htonl(INADDR_ANY)) {
587 inet->mc_index = 0; 587 inet->mc_index = 0;
588 inet->mc_addr = 0; 588 inet->mc_addr = 0;
589 err = 0; 589 err = 0;
diff --git a/net/ipv4/ipconfig.c b/net/ipv4/ipconfig.c
index 5dd938579eeb..7c992fbbc2c3 100644
--- a/net/ipv4/ipconfig.c
+++ b/net/ipv4/ipconfig.c
@@ -103,6 +103,7 @@
103 - '3' from resolv.h */ 103 - '3' from resolv.h */
104 104
105#define NONE __constant_htonl(INADDR_NONE) 105#define NONE __constant_htonl(INADDR_NONE)
106#define ANY __constant_htonl(INADDR_ANY)
106 107
107/* 108/*
108 * Public IP configuration 109 * Public IP configuration
@@ -1479,19 +1480,19 @@ static int __init ip_auto_config_setup(char *addrs)
1479 DBG(("IP-Config: Parameter #%d: `%s'\n", num, ip)); 1480 DBG(("IP-Config: Parameter #%d: `%s'\n", num, ip));
1480 switch (num) { 1481 switch (num) {
1481 case 0: 1482 case 0:
1482 if ((ic_myaddr = in_aton(ip)) == INADDR_ANY) 1483 if ((ic_myaddr = in_aton(ip)) == ANY)
1483 ic_myaddr = NONE; 1484 ic_myaddr = NONE;
1484 break; 1485 break;
1485 case 1: 1486 case 1:
1486 if ((ic_servaddr = in_aton(ip)) == INADDR_ANY) 1487 if ((ic_servaddr = in_aton(ip)) == ANY)
1487 ic_servaddr = NONE; 1488 ic_servaddr = NONE;
1488 break; 1489 break;
1489 case 2: 1490 case 2:
1490 if ((ic_gateway = in_aton(ip)) == INADDR_ANY) 1491 if ((ic_gateway = in_aton(ip)) == ANY)
1491 ic_gateway = NONE; 1492 ic_gateway = NONE;
1492 break; 1493 break;
1493 case 3: 1494 case 3:
1494 if ((ic_netmask = in_aton(ip)) == INADDR_ANY) 1495 if ((ic_netmask = in_aton(ip)) == ANY)
1495 ic_netmask = NONE; 1496 ic_netmask = NONE;
1496 break; 1497 break;
1497 case 4: 1498 case 4: