ip_output.c (74d83b7eedab14e4b963a2220ff76f98fa6d4cb8) ip_output.c (33f99dc7fd948bbc808a24a0989c167f8973b643)
1/*
2 * INET An implementation of the TCP/IP protocol suite for the LINUX
3 * operating system. INET is implemented using the BSD Socket
4 * interface as the means of communication with the user level.
5 *
6 * The Internet Protocol (IP) output module.
7 *
8 * Authors: Ross Biro

--- 874 unchanged lines hidden (view full) ---

883 else
884 alloclen = fraglen;
885
886 /* The last fragment gets additional space at tail.
887 * Note, with MSG_MORE we overallocate on fragments,
888 * because we have no idea what fragment will be
889 * the last.
890 */
1/*
2 * INET An implementation of the TCP/IP protocol suite for the LINUX
3 * operating system. INET is implemented using the BSD Socket
4 * interface as the means of communication with the user level.
5 *
6 * The Internet Protocol (IP) output module.
7 *
8 * Authors: Ross Biro

--- 874 unchanged lines hidden (view full) ---

883 else
884 alloclen = fraglen;
885
886 /* The last fragment gets additional space at tail.
887 * Note, with MSG_MORE we overallocate on fragments,
888 * because we have no idea what fragment will be
889 * the last.
890 */
891 if (datalen == length + fraggap) {
891 if (datalen == length + fraggap)
892 alloclen += rt->dst.trailer_len;
892 alloclen += rt->dst.trailer_len;
893 /* make sure mtu is not reached */
894 if (datalen > mtu - fragheaderlen - rt->dst.trailer_len)
895 datalen -= ALIGN(rt->dst.trailer_len, 8);
896 }
893
897 if (transhdrlen) {
898 skb = sock_alloc_send_skb(sk,
899 alloclen + hh_len + 15,
900 (flags & MSG_DONTWAIT), &err);
901 } else {
902 skb = NULL;
903 if (atomic_read(&sk->sk_wmem_alloc) <=
904 2 * sk->sk_sndbuf)

--- 628 unchanged lines hidden ---
894 if (transhdrlen) {
895 skb = sock_alloc_send_skb(sk,
896 alloclen + hh_len + 15,
897 (flags & MSG_DONTWAIT), &err);
898 } else {
899 skb = NULL;
900 if (atomic_read(&sk->sk_wmem_alloc) <=
901 2 * sk->sk_sndbuf)

--- 628 unchanged lines hidden ---