summaryrefslogtreecommitdiffstats
path: root/usr.sbin/ppp/ip.c
diff options
context:
space:
mode:
authorbrian <brian@FreeBSD.org>1997-05-26 00:44:10 +0000
committerbrian <brian@FreeBSD.org>1997-05-26 00:44:10 +0000
commit12b254e3164dbf2f773ea486a20102fd4183173c (patch)
treef69d2306d93e872c8408a5c5f9931535f7ecf7b1 /usr.sbin/ppp/ip.c
parent8089164d6fdd97167753a3a56afb162c5a6f699c (diff)
downloadFreeBSD-src-12b254e3164dbf2f773ea486a20102fd4183173c.zip
FreeBSD-src-12b254e3164dbf2f773ea486a20102fd4183173c.tar.gz
De-couple ppp from libalias. If libalias isn't there, the
alias commands simply won't work. Only root may specify the location of the alias lib (otherwise, it's hard-coded). Make logprintf silently fail if LogOpen hasn't been called. Suggested by: eivind
Diffstat (limited to 'usr.sbin/ppp/ip.c')
-rw-r--r--usr.sbin/ppp/ip.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/usr.sbin/ppp/ip.c b/usr.sbin/ppp/ip.c
index fe78e9b..72b7a11 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.18 1997/05/23 04:54:02 brian Exp $
+ * $Id: ip.c,v 1.19 1997/05/24 17:32:35 brian Exp $
*
* TODO:
* o Return ICMP message for filterd packet
@@ -33,6 +33,7 @@
#include <netinet/tcp.h>
#include <arpa/inet.h>
#include <alias.h>
+#include "loadalias.h"
#include "vars.h"
#include "filter.h"
@@ -337,7 +338,7 @@ struct mbuf *bp; /* IN: Pointer to IP pakcet */
int iresult;
char *fptr;
- iresult = PacketAliasIn(tunbuff, sizeof tunbuff);
+ iresult = VarPacketAliasIn(tunbuff, sizeof tunbuff);
nb = ntohs(((struct ip *) tunbuff)->ip_len);
if (nb > MAX_MRU) {
@@ -361,8 +362,8 @@ struct mbuf *bp; /* IN: Pointer to IP pakcet */
fprintf(stderr, "wrote %d, got %d\r\n", nb, nw);
if (iresult == PKT_ALIAS_FOUND_HEADER_FRAGMENT) {
- while ((fptr = GetNextFragmentPtr(tunbuff)) != NULL) {
- FragmentAliasIn(tunbuff, fptr);
+ while ((fptr = VarGetNextFragmentPtr(tunbuff)) != NULL) {
+ VarFragmentAliasIn(tunbuff, fptr);
nb = ntohs(((struct ip *) fptr)->ip_len);
nw = write(tun_out, fptr, nb);
if (nw != nb)
@@ -379,7 +380,7 @@ struct mbuf *bp; /* IN: Pointer to IP pakcet */
}
else {
memcpy(fptr, tunbuff, nb);
- SaveFragmentPtr(fptr);
+ VarSaveFragmentPtr(fptr);
}
}
}
OpenPOWER on IntegriCloud