Pass any unmatched slowprotocols frames up the stack instead of dropping them,
there are more subtypes than just LACP.
This commit is contained in:
parent
07aa172f11
commit
af0084c92e
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=175005
@ -213,7 +213,7 @@ static const lacp_timer_func_t lacp_timer_funcs[LACP_NTIMER] = {
|
||||
[LACP_TIMER_WAIT_WHILE] = lacp_sm_mux_timer,
|
||||
};
|
||||
|
||||
void
|
||||
struct mbuf *
|
||||
lacp_input(struct lagg_port *lgp, struct mbuf *m)
|
||||
{
|
||||
struct lagg_softc *sc = lgp->lp_softc;
|
||||
@ -222,7 +222,7 @@ lacp_input(struct lagg_port *lgp, struct mbuf *m)
|
||||
|
||||
if (m->m_pkthdr.len < sizeof(struct ether_header) + sizeof(subtype)) {
|
||||
m_freem(m);
|
||||
return;
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
m_copydata(m, sizeof(struct ether_header), sizeof(subtype), &subtype);
|
||||
@ -237,10 +237,10 @@ lacp_input(struct lagg_port *lgp, struct mbuf *m)
|
||||
break;
|
||||
|
||||
default:
|
||||
/* Unknown LACP packet type */
|
||||
m_freem(m);
|
||||
break;
|
||||
/* Not a subtype we are interested in */
|
||||
return (m);
|
||||
}
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -260,7 +260,7 @@ struct lacp_softc {
|
||||
#define LACP_PORT(_lp) ((struct lacp_port *)(_lp)->lp_psc)
|
||||
#define LACP_SOFTC(_sc) ((struct lacp_softc *)(_sc)->sc_psc)
|
||||
|
||||
void lacp_input(struct lagg_port *, struct mbuf *);
|
||||
struct mbuf *lacp_input(struct lagg_port *, struct mbuf *);
|
||||
struct lagg_port *lacp_select_tx_port(struct lagg_softc *, struct mbuf *);
|
||||
int lacp_attach(struct lagg_softc *);
|
||||
int lacp_detach(struct lagg_softc *);
|
||||
|
@ -1700,8 +1700,9 @@ lagg_lacp_input(struct lagg_softc *sc, struct lagg_port *lp, struct mbuf *m)
|
||||
|
||||
/* Tap off LACP control messages */
|
||||
if (etype == ETHERTYPE_SLOW) {
|
||||
lacp_input(lp, m);
|
||||
return (NULL);
|
||||
m = lacp_input(lp, m);
|
||||
if (m == NULL)
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user