aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6/udp.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/udp.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/udp.c')
-rw-r--r--net/ipv6/udp.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/net/ipv6/udp.c b/net/ipv6/udp.c
index 92bf9033e245..39e3665d9460 100644
--- a/net/ipv6/udp.c
+++ b/net/ipv6/udp.c
@@ -919,6 +919,7 @@ int udpv6_sendmsg(struct kiocb *iocb, struct sock *sk,
919 int ulen = len; 919 int ulen = len;
920 int hlimit = -1; 920 int hlimit = -1;
921 int tclass = -1; 921 int tclass = -1;
922 int dontfrag = -1;
922 int corkreq = up->corkflag || msg->msg_flags&MSG_MORE; 923 int corkreq = up->corkflag || msg->msg_flags&MSG_MORE;
923 int err; 924 int err;
924 int connected = 0; 925 int connected = 0;
@@ -1049,7 +1050,8 @@ do_udp_sendmsg:
1049 memset(opt, 0, sizeof(struct ipv6_txoptions)); 1050 memset(opt, 0, sizeof(struct ipv6_txoptions));
1050 opt->tot_len = sizeof(*opt); 1051 opt->tot_len = sizeof(*opt);
1051 1052
1052 err = datagram_send_ctl(sock_net(sk), msg, &fl, opt, &hlimit, &tclass); 1053 err = datagram_send_ctl(sock_net(sk), msg, &fl, opt, &hlimit,
1054 &tclass, &dontfrag);
1053 if (err < 0) { 1055 if (err < 0) {
1054 fl6_sock_release(flowlabel); 1056 fl6_sock_release(flowlabel);
1055 return err; 1057 return err;
@@ -1120,6 +1122,9 @@ do_udp_sendmsg:
1120 if (tclass < 0) 1122 if (tclass < 0)
1121 tclass = np->tclass; 1123 tclass = np->tclass;
1122 1124
1125 if (dontfrag < 0)
1126 dontfrag = np->dontfrag;
1127
1123 if (msg->msg_flags&MSG_CONFIRM) 1128 if (msg->msg_flags&MSG_CONFIRM)
1124 goto do_confirm; 1129 goto do_confirm;
1125back_from_confirm: 1130back_from_confirm:
@@ -1143,7 +1148,7 @@ do_append_data:
1143 err = ip6_append_data(sk, getfrag, msg->msg_iov, ulen, 1148 err = ip6_append_data(sk, getfrag, msg->msg_iov, ulen,
1144 sizeof(struct udphdr), hlimit, tclass, opt, &fl, 1149 sizeof(struct udphdr), hlimit, tclass, opt, &fl,
1145 (struct rt6_info*)dst, 1150 (struct rt6_info*)dst,
1146 corkreq ? msg->msg_flags|MSG_MORE : msg->msg_flags); 1151 corkreq ? msg->msg_flags|MSG_MORE : msg->msg_flags, dontfrag);
1147 if (err) 1152 if (err)
1148 udp_v6_flush_pending_frames(sk); 1153 udp_v6_flush_pending_frames(sk);
1149 else if (!corkreq) 1154 else if (!corkreq)