View | Details | Raw Unified | Return to bug 23362 | Differences between
and this patch

Collapse All | Expand All

(-)if_sr.c (+10 lines)
Lines 1003-1008 Link Here
1003
srioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
1003
srioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
1004
{
1004
{
1005
	int s, error, was_up, should_be_up;
1005
	int s, error, was_up, should_be_up;
1006
	int was_cisco, should_be_cisco;
1007
#define	IFF_CISCO	IFF_LINK2	/* XXX must match if_spppsubr.c */
1006
	struct sr_softc *sc = ifp->if_softc;
1008
	struct sr_softc *sc = ifp->if_softc;
1007
1009
1008
#if BUGGY > 0
1010
#if BUGGY > 0
Lines 1011-1016 Link Here
1011
#endif
1013
#endif
1012
1014
1013
	was_up = ifp->if_flags & IFF_RUNNING;
1015
	was_up = ifp->if_flags & IFF_RUNNING;
1016
	was_cisco = ifp->if_flags & IFF_CISCO;
1014
1017
1015
	error = sppp_ioctl(ifp, cmd, data);
1018
	error = sppp_ioctl(ifp, cmd, data);
1016
1019
Lines 1071-1076 Link Here
1071
		sppp_flush(ifp);
1074
		sppp_flush(ifp);
1072
	}
1075
	}
1073
	splx(s);
1076
	splx(s);
1077
	should_be_cisco = ifp->if_flags & IFF_CISCO;
1078
	if (was_cisco != should_be_cisco) {
1079
		s = splnet();
1080
		bpfdetach(ifp);
1081
		bpfattach(ifp, should_be_cisco ? DLT_CHDLC : DLT_PPP,
1082
			PPP_HEADER_LEN);
1083
	}
1074
	return 0;
1084
	return 0;
1075
}
1085
}
1076
#endif /* NETGRAPH */
1086
#endif /* NETGRAPH */

Return to bug 23362