summaryrefslogtreecommitdiffstats
path: root/sys/net
diff options
context:
space:
mode:
Diffstat (limited to 'sys/net')
-rw-r--r--sys/net/if_gre.c2
-rw-r--r--sys/net/if_var.h11
2 files changed, 7 insertions, 6 deletions
diff --git a/sys/net/if_gre.c b/sys/net/if_gre.c
index 3b22f43..3e2d826 100644
--- a/sys/net/if_gre.c
+++ b/sys/net/if_gre.c
@@ -624,7 +624,7 @@ gre_set_tunnel(struct ifnet *ifp, struct sockaddr *src,
default:
return (EAFNOSUPPORT);
}
- if (sc->gre_family != src->sa_family)
+ if (sc->gre_family != 0)
gre_detach(sc);
GRE_WLOCK(sc);
if (sc->gre_family != 0)
diff --git a/sys/net/if_var.h b/sys/net/if_var.h
index 58391a1..1ff7a4b 100644
--- a/sys/net/if_var.h
+++ b/sys/net/if_var.h
@@ -236,11 +236,12 @@ struct ifnet {
* count limit does not apply. If all three fields are zero,
* there is no TSO limit.
*
- * NOTE: The TSO limits only apply to the data payload part of
- * a TCP/IP packet. That means there is no need to subtract
- * space for ethernet-, vlan-, IP- or TCP- headers from the
- * TSO limits unless the hardware driver in question requires
- * so.
+ * NOTE: The TSO limits should reflect the values used in the
+ * BUSDMA tag a network adapter is using to load a mbuf chain
+ * for transmission. The TCP/IP network stack will subtract
+ * space for all linklevel and protocol level headers and
+ * ensure that the full mbuf chain passed to the network
+ * adapter fits within the given limits.
*/
u_int if_hw_tsomax;
OpenPOWER on IntegriCloud