View | Details | Raw Unified | Return to bug 243712
Collapse All | Expand All

(-)if_vxlan.c (-1 / +18 lines)
Lines 2725-2732 Link Here
2725
vxlan_clone_create(struct if_clone *ifc, int unit, caddr_t params)
2725
vxlan_clone_create(struct if_clone *ifc, int unit, caddr_t params)
2726
{
2726
{
2727
	struct vxlan_softc *sc;
2727
	struct vxlan_softc *sc;
2728
	struct ifnet *ifp;
2728
	struct ifnet *ifp, *ifpp;
2729
	struct ifvxlanparam vxlp;
2729
	struct ifvxlanparam vxlp;
2730
	const short r4hdrs = 100;	/* Reasonable standard offset for MTU from vxlandev iface */
2730
	int error;
2731
	int error;
2731
2732
2732
	sc = malloc(sizeof(struct vxlan_softc), M_VXLAN, M_WAITOK | M_ZERO);
2733
	sc = malloc(sizeof(struct vxlan_softc), M_VXLAN, M_WAITOK | M_ZERO);
Lines 2776-2781 Link Here
2776
2777
2777
	ifp->if_baudrate = 0;
2778
	ifp->if_baudrate = 0;
2778
	ifp->if_hdrlen = 0;
2779
	ifp->if_hdrlen = 0;
2780
2781
	if (vxlp.vxlp_with & VXLAN_PARAM_WITH_MULTICAST_IF) {
2782
		ifpp = ifunit_ref(sc->vxl_mc_ifname);
2783
		if (ifpp == NULL) {
2784
			if_printf(sc->vxl_ifp, "multicast interface %s does "
2785
			    "not exist\n", sc->vxl_mc_ifname);
2786
			goto fail;
2787
		}
2788
		if (ifpp->if_mtu <= r4hdrs) {
2789
			if_printf(sc->vxl_ifp, "multicast interface %s does "
2790
			    "not have sufficient MTU\n", sc->vxl_mc_ifname);
2791
			goto fail;
2792
		}
2793
2794
		ifp->if_mtu = ifpp->if_mtu - r4hdrs;
2795
	}
2779
2796
2780
	return (0);
2797
	return (0);
2781
2798

Return to bug 243712