summaryrefslogtreecommitdiffstats
path: root/usr.sbin/ppp/ip.c
diff options
context:
space:
mode:
authorjkh <jkh@FreeBSD.org>1996-12-12 14:39:47 +0000
committerjkh <jkh@FreeBSD.org>1996-12-12 14:39:47 +0000
commite9d9f1a03faaebd237b178bafd1984ebdb7f10ce (patch)
tree34061737a5a78521d3b8272572be78e37e2e5ee3 /usr.sbin/ppp/ip.c
parentea690c232d51299477c23bce3db9b26729d4878e (diff)
downloadFreeBSD-src-e9d9f1a03faaebd237b178bafd1984ebdb7f10ce.zip
FreeBSD-src-e9d9f1a03faaebd237b178bafd1984ebdb7f10ce.tar.gz
The infamous IP aliasing code for ppp, modified to work as a runtime option
(otherwise ppp's behavior remains unchanged) and documented by myself, Steve Sims, Nate Williams, Martin Renters and god-only-knows who else. :-) Submitted by: nate Obtained from: Charles Mott <cmott@srv.net>
Diffstat (limited to 'usr.sbin/ppp/ip.c')
-rw-r--r--usr.sbin/ppp/ip.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/usr.sbin/ppp/ip.c b/usr.sbin/ppp/ip.c
index 1756b4d..02290a5 100644
--- a/usr.sbin/ppp/ip.c
+++ b/usr.sbin/ppp/ip.c
@@ -17,7 +17,7 @@
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
- * $Id: ip.c,v 1.9 1996/05/11 20:48:25 phk Exp $
+ * $Id: ip.c,v 1.10 1996/12/03 21:38:45 nate Exp $
*
* TODO:
* o Return ICMP message for filterd packet
@@ -34,6 +34,7 @@
#include <arpa/inet.h>
#include "vars.h"
#include "filter.h"
+#include "alias.h"
extern void SendPppFrame();
extern void LcpClose();
@@ -331,6 +332,11 @@ struct mbuf *bp; /* IN: Pointer to IP pakcet */
nb += wp->cnt;
}
+ if (mode & MODE_ALIAS) {
+ PacketAliasIn(tunbuff);
+ nb = ntohs(((struct ip *) tunbuff)->ip_len);
+ }
+
if ( PacketCheck(tunbuff, nb, FL_IN ) < 0) {
pfree(bp);
return;
OpenPOWER on IntegriCloud