diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2006-09-28 21:00:55 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2006-09-28 21:00:55 -0400 |
commit | a144ea4b7a13087081ab5402fa9ad0bcfd249e67 (patch) | |
tree | a0452a546c231d85a89e8920c26e5dec4595ba54 /net/ipv4/fib_frontend.c | |
parent | 6d85c10abe840e98cbac673202fe7cc9ada2180c (diff) |
[IPV4]: annotate struct in_ifaddr
ifa_local, ifa_address, ifa_mask, ifa_broadcast and ifa_anycast are
net-endian. Annotated them and variables that are inferred to be
net-endian.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/fib_frontend.c')
-rw-r--r-- | net/ipv4/fib_frontend.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/net/ipv4/fib_frontend.c b/net/ipv4/fib_frontend.c index 7f5217907e5a..62ee71ee6bc9 100644 --- a/net/ipv4/fib_frontend.c +++ b/net/ipv4/fib_frontend.c | |||
@@ -667,9 +667,9 @@ void fib_add_ifaddr(struct in_ifaddr *ifa) | |||
667 | struct in_device *in_dev = ifa->ifa_dev; | 667 | struct in_device *in_dev = ifa->ifa_dev; |
668 | struct net_device *dev = in_dev->dev; | 668 | struct net_device *dev = in_dev->dev; |
669 | struct in_ifaddr *prim = ifa; | 669 | struct in_ifaddr *prim = ifa; |
670 | u32 mask = ifa->ifa_mask; | 670 | __be32 mask = ifa->ifa_mask; |
671 | u32 addr = ifa->ifa_local; | 671 | __be32 addr = ifa->ifa_local; |
672 | u32 prefix = ifa->ifa_address&mask; | 672 | __be32 prefix = ifa->ifa_address&mask; |
673 | 673 | ||
674 | if (ifa->ifa_flags&IFA_F_SECONDARY) { | 674 | if (ifa->ifa_flags&IFA_F_SECONDARY) { |
675 | prim = inet_ifa_byprefix(in_dev, prefix, mask); | 675 | prim = inet_ifa_byprefix(in_dev, prefix, mask); |
@@ -685,7 +685,7 @@ void fib_add_ifaddr(struct in_ifaddr *ifa) | |||
685 | return; | 685 | return; |
686 | 686 | ||
687 | /* Add broadcast address, if it is explicitly assigned. */ | 687 | /* Add broadcast address, if it is explicitly assigned. */ |
688 | if (ifa->ifa_broadcast && ifa->ifa_broadcast != 0xFFFFFFFF) | 688 | if (ifa->ifa_broadcast && ifa->ifa_broadcast != htonl(0xFFFFFFFF)) |
689 | fib_magic(RTM_NEWROUTE, RTN_BROADCAST, ifa->ifa_broadcast, 32, prim); | 689 | fib_magic(RTM_NEWROUTE, RTN_BROADCAST, ifa->ifa_broadcast, 32, prim); |
690 | 690 | ||
691 | if (!ZERONET(prefix) && !(ifa->ifa_flags&IFA_F_SECONDARY) && | 691 | if (!ZERONET(prefix) && !(ifa->ifa_flags&IFA_F_SECONDARY) && |
@@ -707,8 +707,8 @@ static void fib_del_ifaddr(struct in_ifaddr *ifa) | |||
707 | struct net_device *dev = in_dev->dev; | 707 | struct net_device *dev = in_dev->dev; |
708 | struct in_ifaddr *ifa1; | 708 | struct in_ifaddr *ifa1; |
709 | struct in_ifaddr *prim = ifa; | 709 | struct in_ifaddr *prim = ifa; |
710 | u32 brd = ifa->ifa_address|~ifa->ifa_mask; | 710 | __be32 brd = ifa->ifa_address|~ifa->ifa_mask; |
711 | u32 any = ifa->ifa_address&ifa->ifa_mask; | 711 | __be32 any = ifa->ifa_address&ifa->ifa_mask; |
712 | #define LOCAL_OK 1 | 712 | #define LOCAL_OK 1 |
713 | #define BRD_OK 2 | 713 | #define BRD_OK 2 |
714 | #define BRD0_OK 4 | 714 | #define BRD0_OK 4 |