diff options
author | YASUOKA Masahiko <yasuoka@cvs.openbsd.org> | 2011-02-24 04:21:35 +0000 |
---|---|---|
committer | YASUOKA Masahiko <yasuoka@cvs.openbsd.org> | 2011-02-24 04:21:35 +0000 |
commit | ba06b7a72e504dc5b0abb45973cef45917cc75c4 (patch) | |
tree | 4885e3a16dd651f7d139defde6a18d8a668cc360 /sys | |
parent | 56ae1aefb7377b83438be70b2e89493b0c1c6c4f (diff) |
Don't use address and control field on PPPoE, they must not be used as
the protocol.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/net/pipex.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/sys/net/pipex.c b/sys/net/pipex.c index a1a79535dc0..dd16db104a7 100644 --- a/sys/net/pipex.c +++ b/sys/net/pipex.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pipex.c,v 1.14 2011/01/28 06:43:00 dlg Exp $ */ +/* $OpenBSD: pipex.c,v 1.15 2011/02/24 04:21:34 yasuoka Exp $ */ /*- * Copyright (c) 2009 Internet Initiative Japan Inc. @@ -965,8 +965,11 @@ pipex_ppp_output(struct mbuf *m0, struct pipex_session *session, int proto) } #endif /* PIPEX_MPPE */ cp = hdr; - PUTCHAR(PPP_ALLSTATIONS, cp); - PUTCHAR(PPP_UI, cp); + if (session->protocol != PIPEX_PROTO_PPPOE) { + /* PPPoE has not address and control field */ + PUTCHAR(PPP_ALLSTATIONS, cp); + PUTCHAR(PPP_UI, cp); + } PUTSHORT(proto, cp); M_PREPEND(m0, cp - hdr, M_NOWAIT); |