aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6/udp.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@sunset.davemloft.net>2005-09-08 15:59:43 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2005-09-08 15:59:43 -0400
commit2e66fc41169c90d93b7811caf7e7822de6aa2259 (patch)
tree014db698b03f898c560919e56fbdae8ca6ad3dd5 /net/ipv6/udp.c
parent42ca89c18b75e1c4c3b02aa5589ad3aa916909a8 (diff)
parent41a1f8ea4fbfcdc4232f023732584aae2220de31 (diff)
Merge git://git.skbuff.net/gitroot/yoshfuji/linux-2.6-git-rfc3542
Diffstat (limited to 'net/ipv6/udp.c')
-rw-r--r--net/ipv6/udp.c19
1 files changed, 13 insertions, 6 deletions
diff --git a/net/ipv6/udp.c b/net/ipv6/udp.c
index 7cbcaa30cf5..f5ae14810a7 100644
--- a/net/ipv6/udp.c
+++ b/net/ipv6/udp.c
@@ -637,6 +637,7 @@ static int udpv6_sendmsg(struct kiocb *iocb, struct sock *sk,
637 int addr_len = msg->msg_namelen; 637 int addr_len = msg->msg_namelen;
638 int ulen = len; 638 int ulen = len;
639 int hlimit = -1; 639 int hlimit = -1;
640 int tclass = -1;
640 int corkreq = up->corkflag || msg->msg_flags&MSG_MORE; 641 int corkreq = up->corkflag || msg->msg_flags&MSG_MORE;
641 int err; 642 int err;
642 643
@@ -758,7 +759,7 @@ do_udp_sendmsg:
758 memset(opt, 0, sizeof(struct ipv6_txoptions)); 759 memset(opt, 0, sizeof(struct ipv6_txoptions));
759 opt->tot_len = sizeof(*opt); 760 opt->tot_len = sizeof(*opt);
760 761
761 err = datagram_send_ctl(msg, fl, opt, &hlimit); 762 err = datagram_send_ctl(msg, fl, opt, &hlimit, &tclass);
762 if (err < 0) { 763 if (err < 0) {
763 fl6_sock_release(flowlabel); 764 fl6_sock_release(flowlabel);
764 return err; 765 return err;
@@ -773,8 +774,7 @@ do_udp_sendmsg:
773 } 774 }
774 if (opt == NULL) 775 if (opt == NULL)
775 opt = np->opt; 776 opt = np->opt;
776 if (flowlabel) 777 opt = fl6_merge_options(&opt_space, flowlabel, opt);
777 opt = fl6_merge_options(&opt_space, flowlabel, opt);
778 778
779 fl->proto = IPPROTO_UDP; 779 fl->proto = IPPROTO_UDP;
780 ipv6_addr_copy(&fl->fl6_dst, daddr); 780 ipv6_addr_copy(&fl->fl6_dst, daddr);
@@ -815,6 +815,12 @@ do_udp_sendmsg:
815 hlimit = ipv6_get_hoplimit(dst->dev); 815 hlimit = ipv6_get_hoplimit(dst->dev);
816 } 816 }
817 817
818 if (tclass < 0) {
819 tclass = np->tclass;
820 if (tclass < 0)
821 tclass = 0;
822 }
823
818 if (msg->msg_flags&MSG_CONFIRM) 824 if (msg->msg_flags&MSG_CONFIRM)
819 goto do_confirm; 825 goto do_confirm;
820back_from_confirm: 826back_from_confirm:
@@ -834,9 +840,10 @@ back_from_confirm:
834 840
835do_append_data: 841do_append_data:
836 up->len += ulen; 842 up->len += ulen;
837 err = ip6_append_data(sk, ip_generic_getfrag, msg->msg_iov, ulen, sizeof(struct udphdr), 843 err = ip6_append_data(sk, ip_generic_getfrag, msg->msg_iov, ulen,
838 hlimit, opt, fl, (struct rt6_info*)dst, 844 sizeof(struct udphdr), hlimit, tclass, opt, fl,
839 corkreq ? msg->msg_flags|MSG_MORE : msg->msg_flags); 845 (struct rt6_info*)dst,
846 corkreq ? msg->msg_flags|MSG_MORE : msg->msg_flags);
840 if (err) 847 if (err)
841 udp_v6_flush_pending_frames(sk); 848 udp_v6_flush_pending_frames(sk);
842 else if (!corkreq) 849 else if (!corkreq)