diff options
author | Bill Sommerfeld <sommerfeld@sun.com> | 2009-11-06 13:57:53 -0800 |
---|---|---|
committer | Bill Sommerfeld <sommerfeld@sun.com> | 2009-11-06 13:57:53 -0800 |
commit | eb0357753ad848b62125fd773f12bec5ea6a20d4 (patch) | |
tree | 8be01a3016f8edee46f49f6be8c3d8d095531204 | |
parent | 772d6a58e8b646d197debb720cdea7723d5892d8 (diff) | |
download | illumos-gate-eb0357753ad848b62125fd773f12bec5ea6a20d4.tar.gz |
6898687 sadb_common_add fails to check return value of tsol_compute_label
-rw-r--r-- | usr/src/uts/common/inet/ip/sadb.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/usr/src/uts/common/inet/ip/sadb.c b/usr/src/uts/common/inet/ip/sadb.c index 314e5b868d..784b3b08aa 100644 --- a/usr/src/uts/common/inet/ip/sadb.c +++ b/usr/src/uts/common/inet/ip/sadb.c @@ -3849,12 +3849,17 @@ sadb_common_add(queue_t *ip_q, queue_t *pfkey_q, mblk_t *mp, sadb_msg_t *samsg, newbie->ipsa_ocred = cred; if (af == AF_INET6) { - tsol_compute_label_v6(cred, (in6_addr_t *)peer_addr_ptr, + error = tsol_compute_label_v6(cred, + (in6_addr_t *)peer_addr_ptr, newbie->ipsa_opt_storage, ipst); } else { - tsol_compute_label(cred, *peer_addr_ptr, + error = tsol_compute_label(cred, *peer_addr_ptr, newbie->ipsa_opt_storage, ipst); } + if (error != 0) { + mutex_exit(&newbie->ipsa_lock); + goto error; + } } |