aboutsummaryrefslogtreecommitdiff
path: root/sys/netinet/tcp_usrreq.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/netinet/tcp_usrreq.c')
-rw-r--r--sys/netinet/tcp_usrreq.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/sys/netinet/tcp_usrreq.c b/sys/netinet/tcp_usrreq.c
index e9f7fa541461..f004d54b4657 100644
--- a/sys/netinet/tcp_usrreq.c
+++ b/sys/netinet/tcp_usrreq.c
@@ -1894,10 +1894,17 @@ err_out:
INP_WUNLOCK(inp);
return (error);
} else if ((sopt->sopt_dir == SOPT_GET) &&
- (sopt->sopt_name == TCP_FUNCTION_BLK)) {
- strncpy(fsn.function_set_name, tp->t_fb->tfb_tcp_block_name,
- TCP_FUNCTION_NAME_LEN_MAX);
- fsn.function_set_name[TCP_FUNCTION_NAME_LEN_MAX - 1] = '\0';
+ ((sopt->sopt_name == TCP_FUNCTION_BLK) ||
+ (sopt->sopt_name == TCP_FUNCTION_ALIAS))) {
+ if (sopt->sopt_name == TCP_FUNCTION_ALIAS) {
+ memset(&fsn, 0, sizeof(fsn));
+ find_tcp_function_alias(tp->t_fb, &fsn);
+ } else {
+ strncpy(fsn.function_set_name,
+ tp->t_fb->tfb_tcp_block_name,
+ TCP_FUNCTION_NAME_LEN_MAX);
+ fsn.function_set_name[TCP_FUNCTION_NAME_LEN_MAX - 1] = '\0';
+ }
fsn.pcbcnt = tp->t_fb->tfb_refcnt;
INP_WUNLOCK(inp);
error = sooptcopyout(sopt, &fsn, sizeof fsn);