diff options
author | David S. Miller <davem@nuts.davemloft.net> | 2004-07-31 09:20:16 -0700 |
---|---|---|
committer | David S. Miller <davem@nuts.davemloft.net> | 2004-07-31 09:20:16 -0700 |
commit | d9fde4ea19fac58b1d0914fec4ce1e6ad2831449 (patch) | |
tree | 78266c276c558474e70a5b1d8797b0de48a69ffe /net | |
parent | 0806f1f834e8cd24ec23bb0f017efa45352eeeb4 (diff) | |
parent | 70a83a8c7ec95b482e068ea8bae32b135dd6cc72 (diff) | |
download | history-d9fde4ea19fac58b1d0914fec4ce1e6ad2831449.tar.gz |
Merge nuts.davemloft.net:/disk1/BK/network-2.6
into nuts.davemloft.net:/disk1/BK/net-2.6
Diffstat (limited to 'net')
-rw-r--r-- | net/ipv4/ipvs/ip_vs_ftp.c | 2 | ||||
-rw-r--r-- | net/ipv4/ipvs/ip_vs_proto_tcp.c | 2 | ||||
-rw-r--r-- | net/ipv4/ipvs/ip_vs_proto_udp.c | 2 | ||||
-rw-r--r-- | net/ipv6/route.c | 37 |
4 files changed, 21 insertions, 22 deletions
diff --git a/net/ipv4/ipvs/ip_vs_ftp.c b/net/ipv4/ipvs/ip_vs_ftp.c index 0ccf9aa33c1814..0165cc6e34c000 100644 --- a/net/ipv4/ipvs/ip_vs_ftp.c +++ b/net/ipv4/ipvs/ip_vs_ftp.c @@ -281,7 +281,7 @@ static int ip_vs_ftp_in(struct ip_vs_app *app, struct ip_vs_conn *cp, while (data <= data_limit - 6) { if (strnicmp(data, "PASV\r\n", 6) == 0) { /* Passive mode on */ - IP_VS_DBG(1-debug, "got PASV at %d of %d\n", + IP_VS_DBG(1-debug, "got PASV at %zd of %zd\n", data - data_start, data_limit - data_start); cp->app_data = &ip_vs_ftp_pasv; diff --git a/net/ipv4/ipvs/ip_vs_proto_tcp.c b/net/ipv4/ipvs/ip_vs_proto_tcp.c index 46c346e8072118..2f00e914288a1a 100644 --- a/net/ipv4/ipvs/ip_vs_proto_tcp.c +++ b/net/ipv4/ipvs/ip_vs_proto_tcp.c @@ -158,7 +158,7 @@ tcp_snat_handler(struct sk_buff **pskb, (*pskb)->len - tcphoff, cp->protocol, (*pskb)->csum); - IP_VS_DBG(11, "O-pkt: %s O-csum=%d (+%d)\n", + IP_VS_DBG(11, "O-pkt: %s O-csum=%d (+%zd)\n", pp->name, tcph->check, (char*)&(tcph->check) - (char*)tcph); } diff --git a/net/ipv4/ipvs/ip_vs_proto_udp.c b/net/ipv4/ipvs/ip_vs_proto_udp.c index 740d8d92c2fcba..81501c93860528 100644 --- a/net/ipv4/ipvs/ip_vs_proto_udp.c +++ b/net/ipv4/ipvs/ip_vs_proto_udp.c @@ -166,7 +166,7 @@ udp_snat_handler(struct sk_buff **pskb, (*pskb)->csum); if (udph->check == 0) udph->check = 0xFFFF; - IP_VS_DBG(11, "O-pkt: %s O-csum=%d (+%d)\n", + IP_VS_DBG(11, "O-pkt: %s O-csum=%d (+%zd)\n", pp->name, udph->check, (char*)&(udph->check) - (char*)udph); } diff --git a/net/ipv6/route.c b/net/ipv6/route.c index a6b6a1be88b11a..143543f262a6de 100644 --- a/net/ipv6/route.c +++ b/net/ipv6/route.c @@ -584,7 +584,24 @@ static void ip6_rt_update_pmtu(struct dst_entry *dst, u32 mtu) /* Protected by rt6_lock. */ static struct dst_entry *ndisc_dst_gc_list; static int ipv6_get_mtu(struct net_device *dev); -static unsigned int ipv6_advmss(unsigned int mtu); + +static inline unsigned int ipv6_advmss(unsigned int mtu) +{ + mtu -= sizeof(struct ipv6hdr) + sizeof(struct tcphdr); + + if (mtu < ip6_rt_min_advmss) + mtu = ip6_rt_min_advmss; + + /* + * Maximal non-jumbo IPv6 payload is IPV6_MAXPLEN and + * corresponding MSS is IPV6_MAXPLEN - tcp_header_size. + * IPV6_MAXPLEN is also valid and means: "any MSS, + * rely only on pmtu discovery" + */ + if (mtu > IPV6_MAXPLEN - sizeof(struct tcphdr)) + mtu = IPV6_MAXPLEN; + return mtu; +} struct dst_entry *ndisc_dst_alloc(struct net_device *dev, struct neighbour *neigh, @@ -692,24 +709,6 @@ static int ipv6_get_mtu(struct net_device *dev) return mtu; } -static unsigned int ipv6_advmss(unsigned int mtu) -{ - mtu -= sizeof(struct ipv6hdr) + sizeof(struct tcphdr); - - if (mtu < ip6_rt_min_advmss) - mtu = ip6_rt_min_advmss; - - /* - * Maximal non-jumbo IPv6 payload is IPV6_MAXPLEN and - * corresponding MSS is IPV6_MAXPLEN - tcp_header_size. - * IPV6_MAXPLEN is also valid and means: "any MSS, - * rely only on pmtu discovery" - */ - if (mtu > IPV6_MAXPLEN - sizeof(struct tcphdr)) - mtu = IPV6_MAXPLEN; - return mtu; -} - static int ipv6_get_hoplimit(struct net_device *dev) { int hoplimit = ipv6_devconf.hop_limit; |