Module Name: src Committed By: is Date: Fri Apr 10 19:45:24 UTC 2020
Modified Files: src/sys/net [is-mlppp]: if_spppsubr.c Log Message: syntax fixes. To generate a diff of this commit: cvs rdiff -u -r1.187.2.4 -r1.187.2.5 src/sys/net/if_spppsubr.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/net/if_spppsubr.c diff -u src/sys/net/if_spppsubr.c:1.187.2.4 src/sys/net/if_spppsubr.c:1.187.2.5 --- src/sys/net/if_spppsubr.c:1.187.2.4 Fri Apr 10 17:28:37 2020 +++ src/sys/net/if_spppsubr.c Fri Apr 10 19:45:24 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: if_spppsubr.c,v 1.187.2.4 2020/04/10 17:28:37 is Exp $ */ +/* $NetBSD: if_spppsubr.c,v 1.187.2.5 2020/04/10 19:45:24 is Exp $ */ /* * Synchronous PPP/Cisco link level subroutines. @@ -41,7 +41,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: if_spppsubr.c,v 1.187.2.4 2020/04/10 17:28:37 is Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_spppsubr.c,v 1.187.2.5 2020/04/10 19:45:24 is Exp $"); #if defined(_KERNEL_OPT) #include "opt_inet.h" @@ -539,7 +539,6 @@ sppp_ml_defrag(struct sppp *sp, struct m u_int8_t flags; u_int32_t seqid; u_int16_t protocol; - u_int16_t *m_protop; int newflen; if (*protocolp != PPP_MP) @@ -554,7 +553,7 @@ sppp_ml_defrag(struct sppp *sp, struct m if (m->m_len < 4) { m = m_pullup(m, 4); if (m == NULL) { - if_statadd2(ifp, if_ierrors, 1, if_iqdrops, 1); + if_statadd2(&sp->pp_if, if_ierrors, 1, if_iqdrops, 1); return NULL; } } @@ -569,15 +568,15 @@ sppp_ml_defrag(struct sppp *sp, struct m if (flags & 0x80) { /* Beginning fragment. */ - sp->lcp.ml_seq_expected=seqid+1; /* next expected */ + sp->lcp.ml_seq_xpctd=seqid+1; /* next expected */ /* TODO: if prefix, count dropped? */ m_freem(sp->lcp.ml_prefix); sp->lcp.ml_prefix = m; - } else if (seqid == sp->lcp.ml_seq_expected) { - sp->lcp.ml_seq_expected=seqid+1; /* next expected */ + } else if (seqid == sp->lcp.ml_seq_xpctd) { + sp->lcp.ml_seq_xpctd=seqid+1; /* next expected */ if (sp->lcp.ml_prefix == 0) { /* didn't see B frame. */ /* TODO: count as dropped. */ @@ -590,7 +589,7 @@ sppp_ml_defrag(struct sppp *sp, struct m */ newflen = m->m_pkthdr.len; m_cat(sp->lcp.ml_prefix, m); - lcp.ml_prefix->m_pkthdr.len += newflen; + sp->lcp.ml_prefix->m_pkthdr.len += newflen; } else { /* @@ -612,14 +611,14 @@ sppp_ml_defrag(struct sppp *sp, struct m sp->lcp.ml_prefix = NULL; if (m->m_len < 2) { - m = m_pullup(m,2) + m = m_pullup(m,2); if (m == NULL) { - * TODO: count as dropped. + /* TODO: count as dropped. */ return NULL; } } /* RFC 1990 2.: don't assume no protocol field compression */ - p = mtod(m, u_int8_t); + p = mtod(m, u_int8_t *); protocol = *p; if (protocol & 1) { @@ -2351,7 +2350,7 @@ sppp_lcp_up(struct sppp *sp) /* Initialize mlppp state */ sp->lcp.mrru = sp->lcp.their_mrru = 0; sp->lcp.ml_prefix = NULL; - sp->lcp.ml_seq_expected = 0; + sp->lcp.ml_seq_xpctd = 0; /* * If this interface is passive or dial-on-demand, and we are