mirror of
https://github.com/torvalds/linux.git
synced 2024-11-23 12:42:02 +00:00
[IPV4]: struct ip_options annotations
->faddr is net-endian; annotated as such, variables inferred to be net-endian annotated. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
7f25afbbef
commit
3ca3c68e76
@ -36,7 +36,7 @@
|
|||||||
* @ts_needaddr - Need to record addr of outgoing dev
|
* @ts_needaddr - Need to record addr of outgoing dev
|
||||||
*/
|
*/
|
||||||
struct ip_options {
|
struct ip_options {
|
||||||
__u32 faddr;
|
__be32 faddr;
|
||||||
unsigned char optlen;
|
unsigned char optlen;
|
||||||
unsigned char srr;
|
unsigned char srr;
|
||||||
unsigned char rr;
|
unsigned char rr;
|
||||||
|
@ -1043,7 +1043,7 @@ int inet_sk_rebuild_header(struct sock *sk)
|
|||||||
{
|
{
|
||||||
struct inet_sock *inet = inet_sk(sk);
|
struct inet_sock *inet = inet_sk(sk);
|
||||||
struct rtable *rt = (struct rtable *)__sk_dst_check(sk, 0);
|
struct rtable *rt = (struct rtable *)__sk_dst_check(sk, 0);
|
||||||
u32 daddr;
|
__be32 daddr;
|
||||||
int err;
|
int err;
|
||||||
|
|
||||||
/* Route is OK, nothing to do. */
|
/* Route is OK, nothing to do. */
|
||||||
|
@ -381,7 +381,7 @@ static void icmp_reply(struct icmp_bxm *icmp_param, struct sk_buff *skb)
|
|||||||
struct inet_sock *inet = inet_sk(sk);
|
struct inet_sock *inet = inet_sk(sk);
|
||||||
struct ipcm_cookie ipc;
|
struct ipcm_cookie ipc;
|
||||||
struct rtable *rt = (struct rtable *)skb->dst;
|
struct rtable *rt = (struct rtable *)skb->dst;
|
||||||
u32 daddr;
|
__be32 daddr;
|
||||||
|
|
||||||
if (ip_options_echo(&icmp_param->replyopts, skb))
|
if (ip_options_echo(&icmp_param->replyopts, skb))
|
||||||
return;
|
return;
|
||||||
|
@ -165,7 +165,7 @@ int ip_options_echo(struct ip_options * dopt, struct sk_buff * skb)
|
|||||||
}
|
}
|
||||||
if (sopt->srr) {
|
if (sopt->srr) {
|
||||||
unsigned char * start = sptr+sopt->srr;
|
unsigned char * start = sptr+sopt->srr;
|
||||||
u32 faddr;
|
__be32 faddr;
|
||||||
|
|
||||||
optlen = start[1];
|
optlen = start[1];
|
||||||
soffset = start[2];
|
soffset = start[2];
|
||||||
|
@ -306,7 +306,7 @@ int ip_queue_xmit(struct sk_buff *skb, int ipfragok)
|
|||||||
/* Make sure we can route this packet. */
|
/* Make sure we can route this packet. */
|
||||||
rt = (struct rtable *)__sk_dst_check(sk, 0);
|
rt = (struct rtable *)__sk_dst_check(sk, 0);
|
||||||
if (rt == NULL) {
|
if (rt == NULL) {
|
||||||
u32 daddr;
|
__be32 daddr;
|
||||||
|
|
||||||
/* Use correct destination address if we have options. */
|
/* Use correct destination address if we have options. */
|
||||||
daddr = inet->daddr;
|
daddr = inet->daddr;
|
||||||
@ -1340,7 +1340,7 @@ void ip_send_reply(struct sock *sk, struct sk_buff *skb, struct ip_reply_arg *ar
|
|||||||
char data[40];
|
char data[40];
|
||||||
} replyopts;
|
} replyopts;
|
||||||
struct ipcm_cookie ipc;
|
struct ipcm_cookie ipc;
|
||||||
u32 daddr;
|
__be32 daddr;
|
||||||
struct rtable *rt = (struct rtable*)skb->dst;
|
struct rtable *rt = (struct rtable*)skb->dst;
|
||||||
|
|
||||||
if (ip_options_echo(&replyopts.opt, skb))
|
if (ip_options_echo(&replyopts.opt, skb))
|
||||||
|
@ -381,7 +381,7 @@ static int raw_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg,
|
|||||||
struct ipcm_cookie ipc;
|
struct ipcm_cookie ipc;
|
||||||
struct rtable *rt = NULL;
|
struct rtable *rt = NULL;
|
||||||
int free = 0;
|
int free = 0;
|
||||||
u32 daddr;
|
__be32 daddr;
|
||||||
u32 saddr;
|
u32 saddr;
|
||||||
u8 tos;
|
u8 tos;
|
||||||
int err;
|
int err;
|
||||||
|
@ -513,7 +513,7 @@ int udp_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg,
|
|||||||
struct rtable *rt = NULL;
|
struct rtable *rt = NULL;
|
||||||
int free = 0;
|
int free = 0;
|
||||||
int connected = 0;
|
int connected = 0;
|
||||||
u32 daddr, faddr, saddr;
|
__be32 daddr, faddr, saddr;
|
||||||
u16 dport;
|
u16 dport;
|
||||||
u8 tos;
|
u8 tos;
|
||||||
int err;
|
int err;
|
||||||
|
Loading…
Reference in New Issue
Block a user