浏览代码

[IPV4]: struct ipcm_cookie annotation

->addr is net-endian

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
Al Viro 18 年之前
父节点
当前提交
c1d18f9fa0
共有 2 个文件被更改,包括 2 次插入2 次删除
  1. 1 1
      include/net/ip.h
  2. 1 1
      net/ipv4/raw.c

+ 1 - 1
include/net/ip.h

@@ -45,7 +45,7 @@ struct inet_skb_parm
 
 struct ipcm_cookie
 {
-	u32			addr;
+	__be32			addr;
 	int			oif;
 	struct ip_options	*opt;
 };

+ 1 - 1
net/ipv4/raw.c

@@ -382,7 +382,7 @@ static int raw_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg,
 	struct rtable *rt = NULL;
 	int free = 0;
 	__be32 daddr;
-	u32 saddr;
+	__be32 saddr;
 	u8  tos;
 	int err;