aboutsummaryrefslogtreecommitdiffstats
path: root/net/econet/af_econet.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/econet/af_econet.c')
-rw-r--r--net/econet/af_econet.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/net/econet/af_econet.c b/net/econet/af_econet.c
index bc12e36263f0..b5524f32ac2d 100644
--- a/net/econet/af_econet.c
+++ b/net/econet/af_econet.c
@@ -162,7 +162,7 @@ static int econet_recvmsg(struct kiocb *iocb, struct socket *sock,
162 err = memcpy_toiovec(msg->msg_iov, skb->data, copied); 162 err = memcpy_toiovec(msg->msg_iov, skb->data, copied);
163 if (err) 163 if (err)
164 goto out_free; 164 goto out_free;
165 skb_get_timestamp(skb, &sk->sk_stamp); 165 sk->sk_stamp = skb->tstamp;
166 166
167 if (msg->msg_name) 167 if (msg->msg_name)
168 memcpy(msg->msg_name, skb->cb, msg->msg_namelen); 168 memcpy(msg->msg_name, skb->cb, msg->msg_namelen);
@@ -345,7 +345,7 @@ static int econet_sendmsg(struct kiocb *iocb, struct socket *sock,
345 goto out_unlock; 345 goto out_unlock;
346 346
347 skb_reserve(skb, LL_RESERVED_SPACE(dev)); 347 skb_reserve(skb, LL_RESERVED_SPACE(dev));
348 skb->nh.raw = skb->data; 348 skb_reset_network_header(skb);
349 349
350 eb = (struct ec_cb *)&skb->cb; 350 eb = (struct ec_cb *)&skb->cb;
351 351
@@ -366,7 +366,7 @@ static int econet_sendmsg(struct kiocb *iocb, struct socket *sock,
366 fh->cb = cb; 366 fh->cb = cb;
367 fh->port = port; 367 fh->port = port;
368 if (sock->type != SOCK_DGRAM) { 368 if (sock->type != SOCK_DGRAM) {
369 skb->tail = skb->data; 369 skb_reset_tail_pointer(skb);
370 skb->len = 0; 370 skb->len = 0;
371 } else if (res < 0) 371 } else if (res < 0)
372 goto out_free; 372 goto out_free;
@@ -727,6 +727,9 @@ static int econet_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg
727 case SIOCGSTAMP: 727 case SIOCGSTAMP:
728 return sock_get_timestamp(sk, argp); 728 return sock_get_timestamp(sk, argp);
729 729
730 case SIOCGSTAMPNS:
731 return sock_get_timestampns(sk, argp);
732
730 case SIOCSIFADDR: 733 case SIOCSIFADDR:
731 case SIOCGIFADDR: 734 case SIOCGIFADDR:
732 return ec_dev_ioctl(sock, cmd, argp); 735 return ec_dev_ioctl(sock, cmd, argp);
@@ -845,7 +848,7 @@ static void aun_send_response(__u32 addr, unsigned long seq, int code, int cb)
845 848
846static void aun_incoming(struct sk_buff *skb, struct aunhdr *ah, size_t len) 849static void aun_incoming(struct sk_buff *skb, struct aunhdr *ah, size_t len)
847{ 850{
848 struct iphdr *ip = skb->nh.iph; 851 struct iphdr *ip = ip_hdr(skb);
849 unsigned char stn = ntohl(ip->saddr) & 0xff; 852 unsigned char stn = ntohl(ip->saddr) & 0xff;
850 struct sock *sk; 853 struct sock *sk;
851 struct sk_buff *newskb; 854 struct sk_buff *newskb;
@@ -940,10 +943,10 @@ static void aun_data_available(struct sock *sk, int slen)
940 printk(KERN_DEBUG "AUN: recvfrom() error %d\n", -err); 943 printk(KERN_DEBUG "AUN: recvfrom() error %d\n", -err);
941 } 944 }
942 945
943 data = skb->h.raw + sizeof(struct udphdr); 946 data = skb_transport_header(skb) + sizeof(struct udphdr);
944 ah = (struct aunhdr *)data; 947 ah = (struct aunhdr *)data;
945 len = skb->len - sizeof(struct udphdr); 948 len = skb->len - sizeof(struct udphdr);
946 ip = skb->nh.iph; 949 ip = ip_hdr(skb);
947 950
948 switch (ah->code) 951 switch (ah->code)
949 { 952 {