diff options
Diffstat (limited to 'packet.c')
-rw-r--r-- | packet.c | 14 |
1 files changed, 13 insertions, 1 deletions
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: packet.c,v 1.265 2017/10/13 21:13:54 djm Exp $ */ | 1 | /* $OpenBSD: packet.c,v 1.266 2017/10/25 00:17:08 djm Exp $ */ |
2 | /* | 2 | /* |
3 | * Author: Tatu Ylonen <ylo@cs.hut.fi> | 3 | * Author: Tatu Ylonen <ylo@cs.hut.fi> |
4 | * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland | 4 | * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland |
@@ -557,6 +557,18 @@ ssh_local_port(struct ssh *ssh) | |||
557 | return ssh->local_port; | 557 | return ssh->local_port; |
558 | } | 558 | } |
559 | 559 | ||
560 | /* Returns the routing domain of the input socket, or NULL if unavailable */ | ||
561 | const char * | ||
562 | ssh_packet_rdomain_in(struct ssh *ssh) | ||
563 | { | ||
564 | if (ssh->rdomain_in != NULL) | ||
565 | return ssh->rdomain_in; | ||
566 | if (!ssh_packet_connection_is_on_socket(ssh)) | ||
567 | return NULL; | ||
568 | ssh->rdomain_in = get_rdomain(ssh->state->connection_in); | ||
569 | return ssh->rdomain_in; | ||
570 | } | ||
571 | |||
560 | /* Closes the connection and clears and frees internal data structures. */ | 572 | /* Closes the connection and clears and frees internal data structures. */ |
561 | 573 | ||
562 | static void | 574 | static void |