Commit a61ced5d authored by Al Viro's avatar Al Viro Committed by David S. Miller
Browse files

[IPV4]: inet_select_addr() annotations



argument and return value are net-endian.  Annotated function and inferred
net-endian variables in callers.

Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 011a9261
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -110,7 +110,7 @@ extern int devinet_ioctl(unsigned int cmd, void __user *);
extern void		devinet_init(void);
extern struct in_device *inetdev_init(struct net_device *dev);
extern struct in_device	*inetdev_by_index(int);
extern u32		inet_select_addr(const struct net_device *dev, u32 dst, int scope);
extern __be32		inet_select_addr(const struct net_device *dev, __be32 dst, int scope);
extern u32		inet_confirm_addr(const struct net_device *dev, u32 dst, u32 local, int scope);
extern struct in_ifaddr *inet_ifa_byprefix(struct in_device *in_dev, u32 prefix, u32 mask);
extern void		inet_forward_change(void);
+2 −2
Original line number Diff line number Diff line
@@ -330,10 +330,10 @@ static void arp_error_report(struct neighbour *neigh, struct sk_buff *skb)

static void arp_solicit(struct neighbour *neigh, struct sk_buff *skb)
{
	u32 saddr = 0;
	__be32 saddr = 0;
	u8  *dst_ha = NULL;
	struct net_device *dev = neigh->dev;
	u32 target = *(u32*)neigh->primary_key;
	__be32 target = *(__be32*)neigh->primary_key;
	int probes = atomic_read(&neigh->probes);
	struct in_device *in_dev = in_dev_get(dev);

+2 −2
Original line number Diff line number Diff line
@@ -876,9 +876,9 @@ out:
	return done;
}

u32 inet_select_addr(const struct net_device *dev, u32 dst, int scope)
__be32 inet_select_addr(const struct net_device *dev, __be32 dst, int scope)
{
	u32 addr = 0;
	__be32 addr = 0;
	struct in_device *in_dev;

	rcu_read_lock();
+1 −1
Original line number Diff line number Diff line
@@ -437,7 +437,7 @@ void icmp_send(struct sk_buff *skb_in, int type, int code, u32 info)
	struct icmp_bxm icmp_param;
	struct rtable *rt = (struct rtable *)skb_in->dst;
	struct ipcm_cookie ipc;
	u32 saddr;
	__be32 saddr;
	u8  tos;

	if (!rt)
+1 −1
Original line number Diff line number Diff line
@@ -464,7 +464,7 @@ join_mcast_group(struct sock *sk, struct in_addr *addr, char *ifname)
static int bind_mcastif_addr(struct socket *sock, char *ifname)
{
	struct net_device *dev;
	u32 addr;
	__be32 addr;
	struct sockaddr_in sin;

	if ((dev = __dev_get_by_name(ifname)) == NULL)
Loading