diff options
Diffstat (limited to 'net/ipv4/devinet.c')
-rw-r--r-- | net/ipv4/devinet.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/net/ipv4/devinet.c b/net/ipv4/devinet.c index f38cbbae0ae3..a1b356c8aa59 100644 --- a/net/ipv4/devinet.c +++ b/net/ipv4/devinet.c | |||
@@ -577,20 +577,20 @@ static int inet_rtm_newaddr(struct sk_buff *skb, struct nlmsghdr *nlh, void *arg | |||
577 | * Determine a default network mask, based on the IP address. | 577 | * Determine a default network mask, based on the IP address. |
578 | */ | 578 | */ |
579 | 579 | ||
580 | static __inline__ int inet_abc_len(u32 addr) | 580 | static __inline__ int inet_abc_len(__be32 addr) |
581 | { | 581 | { |
582 | int rc = -1; /* Something else, probably a multicast. */ | 582 | int rc = -1; /* Something else, probably a multicast. */ |
583 | 583 | ||
584 | if (ZERONET(addr)) | 584 | if (ZERONET(addr)) |
585 | rc = 0; | 585 | rc = 0; |
586 | else { | 586 | else { |
587 | addr = ntohl(addr); | 587 | __u32 haddr = ntohl(addr); |
588 | 588 | ||
589 | if (IN_CLASSA(addr)) | 589 | if (IN_CLASSA(haddr)) |
590 | rc = 8; | 590 | rc = 8; |
591 | else if (IN_CLASSB(addr)) | 591 | else if (IN_CLASSB(haddr)) |
592 | rc = 16; | 592 | rc = 16; |
593 | else if (IN_CLASSC(addr)) | 593 | else if (IN_CLASSC(haddr)) |
594 | rc = 24; | 594 | rc = 24; |
595 | } | 595 | } |
596 | 596 | ||