diff options
author | cinap_lenrek <cinap_lenrek@felloff.net> | 2023-05-21 18:11:25 +0000 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@felloff.net> | 2023-05-21 18:11:25 +0000 |
commit | a65ab6daec833827ff991cbc1eee2a70fa3e4efb (patch) | |
tree | 7de716873e31c66531bd48f2f4b98e2cdb8efd33 /sys | |
parent | 1be331f2084e094f6322744083012b4e394f39fd (diff) |
ip/ppp, ip/pppoe: remove -e flag again (sorry)
This only works when we'r not already having a interface
bound to that ethernet. Otherwise ipconfig can get
confused and adds the addresses to the wrong interface.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/man/8/ppp | 9 | ||||
-rw-r--r-- | sys/src/cmd/ip/ppp/ppp.c | 10 | ||||
-rw-r--r-- | sys/src/cmd/ip/pppoe.c | 10 |
3 files changed, 5 insertions, 24 deletions
diff --git a/sys/man/8/ppp b/sys/man/8/ppp index 1a27d49a6..7006f8048 100644 --- a/sys/man/8/ppp +++ b/sys/man/8/ppp @@ -20,9 +20,6 @@ ppp, pppoe, pptp, pptpd \- point-to-point protocol ] [ .B -p .I dev -| -.B -e -.I dev ] [ .B -x .I netmntpt @@ -128,12 +125,6 @@ disallow packet compression .B C disallow IP header compression .TP -.B e -assigns -.I dev -to the packet interface device (for identification only), -but otherwise communicates over standard I/O. -.TP .B f make PPP add HDLC framing. This is necessary when using PPP over a serial line or a TCP connection diff --git a/sys/src/cmd/ip/ppp/ppp.c b/sys/src/cmd/ip/ppp/ppp.c index e79eaf2c5..36f68cf78 100644 --- a/sys/src/cmd/ip/ppp/ppp.c +++ b/sys/src/cmd/ip/ppp/ppp.c @@ -2845,7 +2845,7 @@ void usage(void) { fprint(2, "usage: ppp [-CPSacdfu] [-b baud] [-k keyspec] [-m mtu] " - "[-M chatfile] [-p dev | -e etherdev] [-x netmntpt] [-t modemcmd] [-U duid] " + "[-M chatfile] [-p dev] [-x netmntpt] [-t modemcmd] [-U duid] " "[local-addr [remote-addr]]\n"); exits("usage"); } @@ -2856,7 +2856,7 @@ main(int argc, char **argv) static PPP ppp[1]; int mtu, framing, user, mediain, mediaout, cfd; Ipaddr ipaddr[2], remip[2]; - char *dev, *ether, *duid, *modemcmd; + char *dev, *duid, *modemcmd; char net[128]; int pfd[2]; char buf[128]; @@ -2873,7 +2873,6 @@ main(int argc, char **argv) invalidate(remip[1]); dev = nil; - ether = nil; mtu = Defmtu; framing = 0; duid = nil; @@ -2899,9 +2898,6 @@ main(int argc, char **argv) case 'd': debug++; break; - case 'e': - ether = EARGF(usage()); - break; case 'f': framing = 1; break; @@ -3021,8 +3017,6 @@ main(int argc, char **argv) fprint(2, "%s: couldn't open /fd/0\n", argv0); exits("/fd/1"); } - /* use the ethernet from pppoe to identify the interface */ - dev = ether; } if(modemcmd != nil && mediaout >= 0) fprint(mediaout, "%s\r", modemcmd); diff --git a/sys/src/cmd/ip/pppoe.c b/sys/src/cmd/ip/pppoe.c index 5430c0af3..49a941efc 100644 --- a/sys/src/cmd/ip/pppoe.c +++ b/sys/src/cmd/ip/pppoe.c @@ -12,7 +12,7 @@ uchar *findtag(uchar*, int, int*, int); void hexdump(uchar*, int); int malformed(uchar*, int, int); int pppoe(char*); -void execppp(char*, int); +void execppp(int); int primary; int forked; @@ -140,7 +140,7 @@ main(int argc, char **argv) } atnotify(catchalarm, 1); - execppp(dev, pppoe(dev)); + execppp(pppoe(dev)); } typedef struct Etherhdr Etherhdr; @@ -616,7 +616,7 @@ Restart: } void -execppp(char *dev, int fd) +execppp(int fd) { char smtu[10]; char *argv[20]; @@ -629,10 +629,6 @@ execppp(char *dev, int fd) argv[argc++] = "-F"; if(debug) argv[argc++] = "-d"; - if(dev){ - argv[argc++] = "-e"; - argv[argc++] = dev; - } if(primary) argv[argc++] = "-P"; if(baud){ |