aboutsummaryrefslogtreecommitdiff
path: root/sys/netinet
diff options
context:
space:
mode:
authorRandall Stewart <rrs@FreeBSD.org>2010-07-29 12:01:59 +0000
committerRandall Stewart <rrs@FreeBSD.org>2010-07-29 12:01:59 +0000
commit753358d725c8a17fe67bf8726dcf7e7b2254fa21 (patch)
tree746da6ab4a2dbb55e8a04cca37471af945dfcd2c /sys/netinet
parent44fbe46280e149431f9402eed2b68d2773c74bbc (diff)
Notes
Diffstat (limited to 'sys/netinet')
-rw-r--r--sys/netinet/sctp_output.c34
1 files changed, 22 insertions, 12 deletions
diff --git a/sys/netinet/sctp_output.c b/sys/netinet/sctp_output.c
index 2a7e402616a7..d902e159f8c8 100644
--- a/sys/netinet/sctp_output.c
+++ b/sys/netinet/sctp_output.c
@@ -2186,21 +2186,31 @@ sctp_is_ifa_addr_preferred(struct sctp_ifa *ifa,
/* dest_is_priv is true if destination is a private address */
/* dest_is_loop is true if destination is a loopback addresses */
- /*
+ /**
* Here we determine if its a preferred address. A preferred address
* means it is the same scope or higher scope then the destination.
* L = loopback, P = private, G = global
- * ----------------------------------------- src | dest | result
- * ---------------------------------------- L | L | yes
- * ----------------------------------------- P | L |
- * yes-v4 no-v6 ----------------------------------------- G |
- * L | yes-v4 no-v6 ----------------------------------------- L
- * | P | no ----------------------------------------- P |
- * P | yes ----------------------------------------- G |
- * P | no ----------------------------------------- L | G
- * | no ----------------------------------------- P | G |
- * no ----------------------------------------- G | G |
- * yes -----------------------------------------
+ * -----------------------------------------
+ * src | dest | result
+ * ----------------------------------------
+ * L | L | yes
+ * -----------------------------------------
+ * P | L | yes-v4 no-v6
+ * -----------------------------------------
+ * G | L | yes-v4 no-v6
+ * -----------------------------------------
+ * L | P | no
+ * -----------------------------------------
+ * P | P | yes
+ * -----------------------------------------
+ * G | P | no
+ * -----------------------------------------
+ * L | G | no
+ * -----------------------------------------
+ * P | G | no
+ * -----------------------------------------
+ * G | G | yes
+ * -----------------------------------------
*/
if (ifa->address.sa.sa_family != fam) {