Hello, Patch 7
# HG changeset patch # User MJP # Date 1452862954 -3600 # Fri Jan 15 14:02:34 2016 +0100 # Node ID 8d76f9f8cc873602c8593b896133648cdedb6afd # Parent 90fa2a12bfaa8776e883c168aaf39be0b16fea4d Add: In the configuration file, define the rdomain of an interface. diff -r 90fa2a12bfaa -r 8d76f9f8cc87 usr.sbin/npppd/npppd/npppd.h --- usr.sbin/npppd/npppd/npppd.h Fri Jan 15 14:02:05 2016 +0100 +++ usr.sbin/npppd/npppd/npppd.h Fri Jan 15 14:02:34 2016 +0100 @@ -179,6 +179,7 @@ TAILQ_ENTRY(iface) entry; char name[IFNAMSIZ]; struct in_addr ip4addr; + int rdomain; struct ipcpconf *ipcpconf; bool is_pppx; }; diff -r 90fa2a12bfaa -r 8d76f9f8cc87 usr.sbin/npppd/npppd/parse.y --- usr.sbin/npppd/npppd/parse.y Fri Jan 15 14:02:05 2016 +0100 +++ usr.sbin/npppd/npppd/parse.y Fri Jan 15 14:02:34 2016 +0100 @@ -132,7 +132,7 @@ %token X_TIMEOUT MAX_TRIES MAX_FAILOVERS SECRET %token POOL_ADDRESS DNS_SERVERS NBNS_SERVERS FOR STATIC DYNAMIC %token RESOLVER ALLOW_USER_SELECTED_ADDRESS -%token INTERFACE ADDRESS IPCP +%token INTERFACE ADDRESS IPCP RDOMAIN %token BIND FROM AUTHENTICATED BY TO %token ERROR %token <v.string> STRING @@ -154,6 +154,7 @@ %type <v.number> authmethod %type <v.number> authmethod_l %type <v.number> ipcppooltype +%type <v.number> ifrdomain %% @@ -853,7 +854,7 @@ /* * interface */ -interface : INTERFACE STRING ADDRESS in4_addr IPCP STRING { +interface : INTERFACE STRING ADDRESS in4_addr IPCP STRING ifrdomain { int cnt; struct iface *n; struct ipcpconf *ipcp; @@ -887,6 +888,7 @@ strlcpy(n->name, $2, sizeof(n->name)); free($2); n->ip4addr = $4; + n->rdomain = $7; if (strncmp(n->name, "pppx", 4) == 0) n->is_pppx = true; @@ -895,6 +897,10 @@ } ; +ifrdomain : /* empty */ { $$ = 0; } + | RDOMAIN NUMBER { $$ = $2; } + ; + /* * bind */ @@ -1079,6 +1085,7 @@ { "pptp-vendor-name", PPTP_VENDOR_NAME}, { "protocol", PROTOCOL}, { "radius", RADIUS}, + { "rdomain", RDOMAIN}, { "required", REQUIRED}, { "resolver", RESOLVER}, { "secret", SECRET},