diff options
| author | Rishi Srivatsavai <Rishi.Srivatsavai@Sun.COM> | 2010-07-29 02:14:42 -0400 |
|---|---|---|
| committer | Rishi Srivatsavai <Rishi.Srivatsavai@Sun.COM> | 2010-07-29 02:14:42 -0400 |
| commit | f689bed18bbb72c93b14a451e959b18f7ccfb7d1 (patch) | |
| tree | 75009110395e119436b5ea6209106e019776a371 /usr/src/cmd/dlmgmtd | |
| parent | d10eddf70e75478ac778e9b04d3d711fe8c3273b (diff) | |
| download | illumos-joyent-f689bed18bbb72c93b14a451e959b18f7ccfb7d1.tar.gz | |
6936702 dlmgmtd restart in global zone leaves exclusive stack zones in down state
6942573 stale dlmgmtd door handle may result in unusable networking features
6938483 NWAM should not ignore VNICs in non-global zones
6931751 DATALINK_CLASS_IPTUN should be 0x80 not 0x60
6939454 dladm show_linkprop -p <private property> truncates DEFAULT value by one character
6928716 dladm delete-secobj passing uninitialized memory
6896251 dladm show-linkprop -P always exits with 1
Diffstat (limited to 'usr/src/cmd/dlmgmtd')
| -rw-r--r-- | usr/src/cmd/dlmgmtd/dlmgmt_db.c | 26 | ||||
| -rw-r--r-- | usr/src/cmd/dlmgmtd/dlmgmt_util.c | 7 |
2 files changed, 28 insertions, 5 deletions
diff --git a/usr/src/cmd/dlmgmtd/dlmgmt_db.c b/usr/src/cmd/dlmgmtd/dlmgmt_db.c index 7cb9e2ce78..99307dbc03 100644 --- a/usr/src/cmd/dlmgmtd/dlmgmt_db.c +++ b/usr/src/cmd/dlmgmtd/dlmgmt_db.c @@ -814,6 +814,12 @@ parse_linkprops(char *buf, dlmgmt_link_t *linkp) curr = buf + i + 1; } + /* Correct any erroneous IPTUN datalink class constant in the file */ + if (linkp->ll_class == 0x60) { + linkp->ll_class = DATALINK_CLASS_IPTUN; + rewrite_needed = B_TRUE; + } + return (0); parse_fail: @@ -1119,8 +1125,8 @@ process_db_read(dlmgmt_db_req_t *req, FILE *fp) } link_in_file.ll_zoneid = req->ls_zoneid; - link_in_db = avl_find(&dlmgmt_name_avl, &link_in_file, - &name_where); + link_in_db = link_by_name(link_in_file.ll_link, + link_in_file.ll_zoneid); if (link_in_db != NULL) { /* * If the link in the database already has the flag @@ -1166,9 +1172,13 @@ process_db_read(dlmgmt_db_req_t *req, FILE *fp) newlink->ll_linkid = dlmgmt_nextlinkid; if (avl_find(&dlmgmt_id_avl, newlink, &id_where) != NULL) { + dlmgmt_log(LOG_WARNING, "Link ID %d is already" + " in use, destroying link %s", + newlink->ll_linkid, newlink->ll_link); link_destroy(newlink); continue; } + if ((req->ls_flags & DLMGMT_ACTIVE) && link_activate(newlink) != 0) { dlmgmt_log(LOG_WARNING, "Unable to activate %s", @@ -1176,8 +1186,18 @@ process_db_read(dlmgmt_db_req_t *req, FILE *fp) link_destroy(newlink); continue; } - avl_insert(&dlmgmt_name_avl, newlink, name_where); + avl_insert(&dlmgmt_id_avl, newlink, id_where); + /* + * link_activate call above can insert newlink in + * dlmgmt_name_avl tree when activating a link that is + * assigned to a NGZ. + */ + if (avl_find(&dlmgmt_name_avl, newlink, + &name_where) == NULL) + avl_insert(&dlmgmt_name_avl, newlink, + name_where); + dlmgmt_advance(newlink); newlink->ll_flags |= req->ls_flags; } diff --git a/usr/src/cmd/dlmgmtd/dlmgmt_util.c b/usr/src/cmd/dlmgmtd/dlmgmt_util.c index 96b2b3b826..004c8f257b 100644 --- a/usr/src/cmd/dlmgmtd/dlmgmt_util.c +++ b/usr/src/cmd/dlmgmtd/dlmgmt_util.c @@ -367,7 +367,7 @@ int link_activate(dlmgmt_link_t *linkp) { int err = 0; - zoneid_t zoneid; + zoneid_t zoneid = ALL_ZONES; if (zone_check_datalink(&zoneid, linkp->ll_linkid) == 0) { /* @@ -379,7 +379,10 @@ link_activate(dlmgmt_link_t *linkp) err = EEXIST; goto done; } - avl_remove(&dlmgmt_name_avl, linkp); + + if (avl_find(&dlmgmt_name_avl, linkp, NULL) != NULL) + avl_remove(&dlmgmt_name_avl, linkp); + linkp->ll_zoneid = zoneid; avl_add(&dlmgmt_name_avl, linkp); avl_add(&dlmgmt_loan_avl, linkp); |
