code: plan9front

Download patch

ref: 2ca3934809cc51fed6a386eb13f67f08fd89fdf2
parent: e48a5c343d3ba76c6dfb949b5178e46a41792f72
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Fri Jan 5 00:48:37 EST 2024

ip/ppp: remove -> del

--- a/sys/src/cmd/ip/ppp/ppp.c
+++ b/sys/src/cmd/ip/ppp/ppp.c
@@ -1616,14 +1616,14 @@
 }
 
 static void
-removeip(int shell, char *net, char *dev, Ipaddr local, Ipaddr remote)
+delip(int shell, char *net, char *dev, Ipaddr local, Ipaddr remote)
 {
 	if(validv4(local) && validv4(remote)){
 		ipconfig(shell, net, dev, 0, 0, remote, nil, nil);
-		fprint(shell, "remove %I 255.255.255.255\n", local);
+		fprint(shell, "del %I 255.255.255.255\n", local);
 	} else if(validv6(local)){
 		ipconfig(shell, net, dev, 0, 0, nil, nil, nil);
-		fprint(shell, "remove %I /64\n", local);
+		fprint(shell, "del %I /64\n", local);
 	}
 }
 
@@ -1698,7 +1698,7 @@
 		}
 
 		/* fork in background, main returns */
-		fprint(ppp->shellin, "rc </fd/0 &; exit ''\n");
+		fprint(ppp->shellin, "rc -I </fd/0 &; exit ''\n");
 	} else {
 		/* we may have changed addresses */
 		if(ipcmp(ppp->local, ppp->curlocal) != 0 || ipcmp(ppp->remote, ppp->curremote) != 0){
@@ -1706,13 +1706,13 @@
 				ipmove(ppp->remote, ppp->local);
 			syslog(0, LOG, "%I/%I -> %I/%I", ppp->curlocal, ppp->curremote,
 				ppp->local, ppp->remote);
-			removeip(ppp->shellin, ppp->net, ppp->dev, ppp->curlocal, ppp->curremote);
+			delip(ppp->shellin, ppp->net, ppp->dev, ppp->curlocal, ppp->curremote);
 			addip(ppp->shellin, ppp->net, ppp->dev, ppp->local, ppp->remote, ppp->mtu, ppp->dns);
 		}
 		if(ipcmp(ppp->local6, ppp->curlocal6) != 0 || ipcmp(ppp->remote6, ppp->curremote6) != 0){
 			syslog(0, LOG, "%I/%I -> %I/%I", ppp->curlocal6, ppp->curremote6,
 				ppp->local6, ppp->remote6);
-			removeip(ppp->shellin, ppp->net, ppp->dev, ppp->curlocal6, ppp->curremote6);
+			delip(ppp->shellin, ppp->net, ppp->dev, ppp->curlocal6, ppp->curremote6);
 			addip(ppp->shellin, ppp->net, ppp->dev, ppp->local6, ppp->remote6, ppp->mtu, nil);
 			v6autoconfig(ppp->shellin, ppp->net, ppp->dev, ppp->remote6, ppp->duid);
 		}
@@ -1933,8 +1933,8 @@
 	syslog(0, LOG, "ppp: terminated: %s", why);
 
 	if(ppp->dev != nil){
-		removeip(ppp->shellin, ppp->net, ppp->dev, ppp->curlocal, ppp->curremote);
-		removeip(ppp->shellin, ppp->net, ppp->dev, ppp->curlocal6, ppp->curremote6);
+		delip(ppp->shellin, ppp->net, ppp->dev, ppp->curlocal, ppp->curremote);
+		delip(ppp->shellin, ppp->net, ppp->dev, ppp->curlocal6, ppp->curremote6);
 	}
 	fprint(ppp->shellin, "exit %q\n", why);
 	close(ppp->shellin);