aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ppp
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2014-07-16 17:09:34 -0400
committerDavid S. Miller <davem@davemloft.net>2014-07-16 17:09:34 -0400
commit1a98c69af1ecd97bfd1f4e4539924a9192434e36 (patch)
treea243defcf921ea174f8e43fce11d06830a6a9c36 /drivers/net/ppp
parent7a575f6b907ea5d207d2b5010293c189616eae34 (diff)
parentb6603fe574af289dbe9eb9fb4c540bca04f5a053 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ppp')
-rw-r--r--drivers/net/ppp/ppp_generic.c8
-rw-r--r--drivers/net/ppp/pppoe.c2
2 files changed, 2 insertions, 8 deletions
diff --git a/drivers/net/ppp/ppp_generic.c b/drivers/net/ppp/ppp_generic.c
index c38ee903bd59..3ed16a89b5d8 100644
--- a/drivers/net/ppp/ppp_generic.c
+++ b/drivers/net/ppp/ppp_generic.c
@@ -539,7 +539,7 @@ static int get_filter(void __user *arg, struct sock_filter **p)
539{ 539{
540 struct sock_fprog uprog; 540 struct sock_fprog uprog;
541 struct sock_filter *code = NULL; 541 struct sock_filter *code = NULL;
542 int len, err; 542 int len;
543 543
544 if (copy_from_user(&uprog, arg, sizeof(uprog))) 544 if (copy_from_user(&uprog, arg, sizeof(uprog)))
545 return -EFAULT; 545 return -EFAULT;
@@ -554,12 +554,6 @@ static int get_filter(void __user *arg, struct sock_filter **p)
554 if (IS_ERR(code)) 554 if (IS_ERR(code))
555 return PTR_ERR(code); 555 return PTR_ERR(code);
556 556
557 err = sk_chk_filter(code, uprog.len);
558 if (err) {
559 kfree(code);
560 return err;
561 }
562
563 *p = code; 557 *p = code;
564 return uprog.len; 558 return uprog.len;
565} 559}
diff --git a/drivers/net/ppp/pppoe.c b/drivers/net/ppp/pppoe.c
index 2ea7efd11857..6c9c16d76935 100644
--- a/drivers/net/ppp/pppoe.c
+++ b/drivers/net/ppp/pppoe.c
@@ -675,7 +675,7 @@ static int pppoe_connect(struct socket *sock, struct sockaddr *uservaddr,
675 po->chan.hdrlen = (sizeof(struct pppoe_hdr) + 675 po->chan.hdrlen = (sizeof(struct pppoe_hdr) +
676 dev->hard_header_len); 676 dev->hard_header_len);
677 677
678 po->chan.mtu = dev->mtu - sizeof(struct pppoe_hdr); 678 po->chan.mtu = dev->mtu - sizeof(struct pppoe_hdr) - 2;
679 po->chan.private = sk; 679 po->chan.private = sk;
680 po->chan.ops = &pppoe_chan_ops; 680 po->chan.ops = &pppoe_chan_ops;
681 681