Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-7]: src/sys/netinet Pull up following revision(s) (requested by j...



details:   https://anonhg.NetBSD.org/src/rev/872bd728dfdf
branches:  netbsd-7
changeset: 800333:872bd728dfdf
user:      snj <snj%NetBSD.org@localhost>
date:      Mon Sep 11 05:46:43 2017 +0000

description:
Pull up following revision(s) (requested by jdolecek in ticket #1498):
        sys/netinet/tcp_usrreq.c: revision 1.216
add some more getsockopt(2) params

diffstat:

 sys/netinet/tcp_usrreq.c |  26 ++++++++++++++++++--------
 1 files changed, 18 insertions(+), 8 deletions(-)

diffs (59 lines):

diff -r c4aee9cdc9c0 -r 872bd728dfdf sys/netinet/tcp_usrreq.c
--- a/sys/netinet/tcp_usrreq.c  Mon Sep 11 04:55:52 2017 +0000
+++ b/sys/netinet/tcp_usrreq.c  Mon Sep 11 05:46:43 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: tcp_usrreq.c,v 1.200.2.2 2015/02/21 13:40:19 martin Exp $      */
+/*     $NetBSD: tcp_usrreq.c,v 1.200.2.3 2017/09/11 05:46:43 snj Exp $ */
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -99,7 +99,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: tcp_usrreq.c,v 1.200.2.2 2015/02/21 13:40:19 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tcp_usrreq.c,v 1.200.2.3 2017/09/11 05:46:43 snj Exp $");
 
 #include "opt_inet.h"
 #include "opt_ipsec.h"
@@ -500,17 +500,14 @@
 #ifdef TCP_SIGNATURE
                case TCP_MD5SIG:
                        optval = (tp->t_flags & TF_SIGNATURE) ? 1 : 0;
-                       error = sockopt_set(sopt, &optval, sizeof(optval));
-                       break;
+                       goto setval;
 #endif
                case TCP_NODELAY:
                        optval = tp->t_flags & TF_NODELAY;
-                       error = sockopt_set(sopt, &optval, sizeof(optval));
-                       break;
+                       goto setval;
                case TCP_MAXSEG:
                        optval = tp->t_peermss;
-                       error = sockopt_set(sopt, &optval, sizeof(optval));
-                       break;
+                       goto setval;
                case TCP_INFO:
                        tcp_fill_info(tp, &ti);
                        error = sockopt_set(sopt, &ti, sizeof ti);
@@ -519,6 +516,19 @@
                case TCP_CONGCTL:
                        break;
 #endif
+               case TCP_KEEPIDLE:
+                       optval = tp->t_keepidle;
+                       goto setval;
+               case TCP_KEEPINTVL:
+                       optval = tp->t_keepintvl;
+                       goto setval;
+               case TCP_KEEPCNT:
+                       optval = tp->t_keepcnt;
+                       goto setval;
+               case TCP_KEEPINIT:
+                       optval = tp->t_keepcnt;
+setval:                        error = sockopt_set(sopt, &optval, sizeof(optval));
+                       break;
                default:
                        error = ENOPROTOOPT;
                        break;



Home | Main Index | Thread Index | Old Index