diff options
author | julian <julian@FreeBSD.org> | 1999-11-15 04:03:34 +0000 |
---|---|---|
committer | julian <julian@FreeBSD.org> | 1999-11-15 04:03:34 +0000 |
commit | 3b8d09a9f991095f69b7a21be1b4a372eef1f5ce (patch) | |
tree | 90285c3ac020b3bde2c390aeab190bf26cf6ec89 | |
parent | 10b17f5376bc329b2852b03375556cea4d6c7613 (diff) | |
download | FreeBSD-src-3b8d09a9f991095f69b7a21be1b4a372eef1f5ce.zip FreeBSD-src-3b8d09a9f991095f69b7a21be1b4a372eef1f5ce.tar.gz |
Small fixes from Brian for the Server side of PPPoE.
-rw-r--r-- | sys/netgraph/ng_pppoe.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/sys/netgraph/ng_pppoe.c b/sys/netgraph/ng_pppoe.c index f91f799..2d6a8ad 100644 --- a/sys/netgraph/ng_pppoe.c +++ b/sys/netgraph/ng_pppoe.c @@ -808,8 +808,8 @@ AAA switch(wh->eh.ether_type) { case ETHERTYPE_PPPOE_DISC: /* - * We need to try make sure that the tag area - * is contiguous, or we could wander of the end + * We need to try to make sure that the tag area + * is contiguous, or we could wander off the end * of a buffer and make a mess. * (Linux wouldn't have this problem). */ @@ -966,16 +966,15 @@ AAA */ init_tags(sp); insert_tag(sp, &neg->ac_name.hdr); /* AC_NAME */ - if ((get_tag(ph, PTT_SRV_NAME))) + if ((tag = get_tag(ph, PTT_SRV_NAME))) insert_tag(sp, tag);/* return service */ if ((tag = get_tag(ph, PTT_HOST_UNIQ))) insert_tag(sp, tag); /* return it */ insert_tag(sp, utag); /* ac_cookie */ scan_tags(sp, ph); make_packet(sp); - sp->state = PPPOE_NEWCONNECTED; sendpacket(sp); - pppoe_send_event(sp, NGM_PPPOE_SUCCESS); + sp->state = PPPOE_NEWCONNECTED; /* * Having sent the last Negotiation header, * Set up the stored packet header to @@ -1142,10 +1141,11 @@ AAA * wants us to offer service. */ neg = sp->neg; - if (m->m_len < sizeof(*wh)) - m_pullup(m, sizeof(*wh)); - if (m == NULL) { - LEAVE(ENOBUFS); + if (m->m_len < sizeof(*wh)) { + m = m_pullup(m, sizeof(*wh)); + if (m == NULL) { + LEAVE(ENOBUFS); + } } wh = mtod(m, struct pppoe_full_hdr *); ph = &wh->ph; |