aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6/raw.c
diff options
context:
space:
mode:
authorBrian Haley <brian.haley@hp.com>2010-04-23 07:26:08 -0400
committerDavid S. Miller <davem@davemloft.net>2010-04-24 02:35:28 -0400
commit13b52cd44670e3359055e9918d0e766d89836425 (patch)
tree7685597f218fd02dab9abdb32ea0d4ec7c318027 /net/ipv6/raw.c
parent793b14731686595a741d9f47726ad8b9a235385a (diff)
IPv6: Add dontfrag argument to relevant functions
Add dontfrag argument to relevant functions for IPV6_DONTFRAG support, as well as allowing the value to be passed-in via ancillary cmsg data. Signed-off-by: Brian Haley <brian.haley@hp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6/raw.c')
-rw-r--r--net/ipv6/raw.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/net/ipv6/raw.c b/net/ipv6/raw.c
index 8763b1a0814..44a84ea9b3e 100644
--- a/net/ipv6/raw.c
+++ b/net/ipv6/raw.c
@@ -733,6 +733,7 @@ static int rawv6_sendmsg(struct kiocb *iocb, struct sock *sk,
733 int addr_len = msg->msg_namelen; 733 int addr_len = msg->msg_namelen;
734 int hlimit = -1; 734 int hlimit = -1;
735 int tclass = -1; 735 int tclass = -1;
736 int dontfrag = -1;
736 u16 proto; 737 u16 proto;
737 int err; 738 int err;
738 739
@@ -811,7 +812,8 @@ static int rawv6_sendmsg(struct kiocb *iocb, struct sock *sk,
811 memset(opt, 0, sizeof(struct ipv6_txoptions)); 812 memset(opt, 0, sizeof(struct ipv6_txoptions));
812 opt->tot_len = sizeof(struct ipv6_txoptions); 813 opt->tot_len = sizeof(struct ipv6_txoptions);
813 814
814 err = datagram_send_ctl(sock_net(sk), msg, &fl, opt, &hlimit, &tclass); 815 err = datagram_send_ctl(sock_net(sk), msg, &fl, opt, &hlimit,
816 &tclass, &dontfrag);
815 if (err < 0) { 817 if (err < 0) {
816 fl6_sock_release(flowlabel); 818 fl6_sock_release(flowlabel);
817 return err; 819 return err;
@@ -880,6 +882,9 @@ static int rawv6_sendmsg(struct kiocb *iocb, struct sock *sk,
880 if (tclass < 0) 882 if (tclass < 0)
881 tclass = np->tclass; 883 tclass = np->tclass;
882 884
885 if (dontfrag < 0)
886 dontfrag = np->dontfrag;
887
883 if (msg->msg_flags&MSG_CONFIRM) 888 if (msg->msg_flags&MSG_CONFIRM)
884 goto do_confirm; 889 goto do_confirm;
885 890
@@ -890,7 +895,7 @@ back_from_confirm:
890 lock_sock(sk); 895 lock_sock(sk);
891 err = ip6_append_data(sk, ip_generic_getfrag, msg->msg_iov, 896 err = ip6_append_data(sk, ip_generic_getfrag, msg->msg_iov,
892 len, 0, hlimit, tclass, opt, &fl, (struct rt6_info*)dst, 897 len, 0, hlimit, tclass, opt, &fl, (struct rt6_info*)dst,
893 msg->msg_flags); 898 msg->msg_flags, dontfrag);
894 899
895 if (err) 900 if (err)
896 ip6_flush_pending_frames(sk); 901 ip6_flush_pending_frames(sk);