diff options
author | gfaden <none@none> | 2008-02-25 17:23:19 -0800 |
---|---|---|
committer | gfaden <none@none> | 2008-02-25 17:23:19 -0800 |
commit | de860bd9529e1034e1666f74f7bc0ec8cd5ca701 (patch) | |
tree | 4895a1aa39176716fe2f6d72b766dea48a96c8b1 /usr/src/cmd/zoneadmd/vplat.c | |
parent | 321febde881fb7f55caa9bc4766f121ff16cd65e (diff) | |
download | illumos-joyent-de860bd9529e1034e1666f74f7bc0ec8cd5ca701.tar.gz |
6583565 need a mechanism to configure a per zone default route in shared IP stack for TX
Diffstat (limited to 'usr/src/cmd/zoneadmd/vplat.c')
-rw-r--r-- | usr/src/cmd/zoneadmd/vplat.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/usr/src/cmd/zoneadmd/vplat.c b/usr/src/cmd/zoneadmd/vplat.c index 59225164a6..1b5f4da8be 100644 --- a/usr/src/cmd/zoneadmd/vplat.c +++ b/usr/src/cmd/zoneadmd/vplat.c @@ -2476,6 +2476,30 @@ configure_one_interface(zlog_t *zlogp, zoneid_t zone_id, lifr.lifr_name, addrstr4, buffer); } + /* + * If a default router was specified for this interface + * set the route now. Ignore if already set. + */ + if (strlen(nwiftabptr->zone_nwif_defrouter) > 0) { + int status; + char *argv[7]; + + argv[0] = "route"; + argv[1] = "add"; + argv[2] = "-ifp"; + argv[3] = nwiftabptr->zone_nwif_physical; + argv[4] = "default"; + argv[5] = nwiftabptr->zone_nwif_defrouter; + argv[6] = NULL; + + status = forkexec(zlogp, "/usr/sbin/route", argv); + if (status != 0 && status != EEXIST) + zerror(zlogp, B_FALSE, "Unable to set route for " + "interface %s to %s\n", + nwiftabptr->zone_nwif_physical, + nwiftabptr->zone_nwif_defrouter); + } + (void) close(s); return (Z_OK); bad: |