Bugzilla – Attachment 1646 Details for
Bug 1604
SCTP support for openssh
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
patch which solves the problem
openssh-5.2p1_sctp.patch (text/plain), 8.50 KB, created by
jchadima
on 2009-06-10 00:38:40 AEST
(
hide
)
Description:
patch which solves the problem
Filename:
MIME Type:
Creator:
jchadima
Created:
2009-06-10 00:38:40 AEST
Size:
8.50 KB
patch
obsolete
>diff -ur openssh-5.2p1.orig/readconf.c openssh-5.2p1/readconf.c >--- openssh-5.2p1.orig/readconf.c 2009-02-14 06:28:21.000000000 +0100 >+++ openssh-5.2p1/readconf.c 2009-06-09 16:01:33.749527299 +0200 >@@ -131,7 +131,7 @@ > oSendEnv, oControlPath, oControlMaster, oHashKnownHosts, > oTunnel, oTunnelDevice, oLocalCommand, oPermitLocalCommand, > oVisualHostKey, oZeroKnowledgePasswordAuthentication, >- oDeprecated, oUnsupported >+ oUseSCTP,oDeprecated, oUnsupported > } OpCodes; > > /* Textual representations of the tokens. */ >@@ -234,7 +234,7 @@ > #else > { "zeroknowledgepasswordauthentication", oUnsupported }, > #endif >- >+ { "usesctp", oUseSCTP }, > { NULL, oBadOption } > }; > >@@ -914,6 +914,12 @@ > intptr = &options->visual_host_key; > goto parse_flag; > >+ case oUseSCTP: >+#ifdef IPPROTO_SCTP >+ intptr = &options->use_sctp; >+ goto parse_flag; >+#endif >+ > case oDeprecated: > debug("%s line %d: Deprecated option \"%s\"", > filename, linenum, keyword); >@@ -1065,6 +1071,7 @@ > options->permit_local_command = -1; > options->visual_host_key = -1; > options->zero_knowledge_password_authentication = -1; >+ options->use_sctp = -1; > } > > /* >@@ -1203,6 +1210,8 @@ > options->visual_host_key = 0; > if (options->zero_knowledge_password_authentication == -1) > options->zero_knowledge_password_authentication = 0; >+ if (options->use_sctp == -1) >+ options->use_sctp = 0; > /* options->local_command should not be set by default */ > /* options->proxy_command should not be set by default */ > /* options->user will be set in the main program if appropriate */ >diff -ur openssh-5.2p1.orig/readconf.h openssh-5.2p1/readconf.h >--- openssh-5.2p1.orig/readconf.h 2009-02-14 06:28:21.000000000 +0100 >+++ openssh-5.2p1/readconf.h 2009-06-09 16:01:36.640755439 +0200 >@@ -123,6 +123,8 @@ > int permit_local_command; > int visual_host_key; > >+ int use_sctp; >+ > } Options; > > #define SSHCTL_MASTER_NO 0 >diff -ur openssh-5.2p1.orig/servconf.c openssh-5.2p1/servconf.c >--- openssh-5.2p1.orig/servconf.c 2009-01-28 06:31:23.000000000 +0100 >+++ openssh-5.2p1/servconf.c 2009-06-09 16:01:36.642842446 +0200 >@@ -64,6 +64,7 @@ > options->ports_from_cmdline = 0; > options->listen_addrs = NULL; > options->address_family = -1; >+ options->ip_protocol = -1; > options->num_host_key_files = 0; > options->pid_file = NULL; > options->server_key_bits = -1; >@@ -152,6 +153,8 @@ > _PATH_HOST_DSA_KEY_FILE; > } > } >+ if (options->ip_protocol == -1) >+ options->ip_protocol = IPPROTO_TCP; > if (options->num_ports == 0) > options->ports[options->num_ports++] = SSH_DEFAULT_PORT; > if (options->listen_addrs == NULL) >@@ -306,7 +309,7 @@ > sMatch, sPermitOpen, sForceCommand, sChrootDirectory, > sUsePrivilegeSeparation, sAllowAgentForwarding, > sZeroKnowledgePasswordAuthentication, >- sDeprecated, sUnsupported >+ sIPProtocol, sDeprecated, sUnsupported > } ServerOpCodes; > > #define SSHCFG_GLOBAL 0x01 /* allowed in main section of sshd_config */ >@@ -424,6 +427,7 @@ > { "permitopen", sPermitOpen, SSHCFG_ALL }, > { "forcecommand", sForceCommand, SSHCFG_ALL }, > { "chrootdirectory", sChrootDirectory, SSHCFG_ALL }, >+ { "ipprotocol", sIPProtocol, SSHCFG_GLOBAL }, > { NULL, sBadOption, 0 } > }; > >@@ -482,8 +486,10 @@ > char strport[NI_MAXSERV]; > int gaierr; > >+next: > memset(&hints, 0, sizeof(hints)); > hints.ai_family = options->address_family; >+ hints.ai_protocol = options->ip_protocol ? options->ip_protocol : IPPROTO_TCP; > hints.ai_socktype = SOCK_STREAM; > hints.ai_flags = (addr == NULL) ? AI_PASSIVE : 0; > snprintf(strport, sizeof strport, "%d", port); >@@ -495,6 +501,12 @@ > ; > ai->ai_next = options->listen_addrs; > options->listen_addrs = aitop; >+#ifdef IPPROTO_SCTP >+ if (options->ip_protocol) >+ return; >+ options->ip_protocol = IPPROTO_SCTP; >+ goto next; >+#endif > } > > /* >@@ -1294,6 +1306,25 @@ > *charptr = xstrdup(arg); > break; > >+ case sIPProtocol: >+#ifdef IPPROTO_SCTP >+ intptr = &options->ip_protocol; >+ arg = strdelim(&cp); >+ if (!arg || *arg == '\0') >+ fatal("%s line %d: Missing argument.", filename, linenum); >+ value = 0; /* silence compiler */ >+ if (strcmp(arg, "tcp") == 0) >+ value = IPPROTO_TCP; >+ else if (strcmp(arg, "sctp") == 0) >+ value = IPPROTO_SCTP; >+ else if (strcmp(arg, "both") == 0) >+ value = 0; >+ else >+ fatal("%s line %d: Bad tcp/sctp/both " , filename, linenum); >+ if (*intptr == IPPROTO_SCTP) >+ *intptr = value; >+#endif >+ > case sDeprecated: > logit("%s line %d: Deprecated option %s", > filename, linenum, arg); >diff -ur openssh-5.2p1.orig/servconf.h openssh-5.2p1/servconf.h >--- openssh-5.2p1.orig/servconf.h 2009-01-28 06:31:23.000000000 +0100 >+++ openssh-5.2p1/servconf.h 2009-06-09 16:01:36.644526973 +0200 >@@ -151,6 +151,7 @@ > int num_permitted_opens; > > char *chroot_directory; >+ int ip_protocol; > } ServerOptions; > > void initialize_server_options(ServerOptions *); >diff -ur openssh-5.2p1.orig/ssh_config openssh-5.2p1/ssh_config >--- openssh-5.2p1.orig/ssh_config 2009-02-21 02:45:02.000000000 +0100 >+++ openssh-5.2p1/ssh_config 2009-06-09 16:01:36.645478675 +0200 >@@ -26,6 +26,7 @@ > # HostbasedAuthentication no > # GSSAPIAuthentication no > # GSSAPIDelegateCredentials no >+# UseSCTP no > # BatchMode no > # CheckHostIP yes > # AddressFamily any >diff -ur openssh-5.2p1.orig/ssh_config.0 openssh-5.2p1/ssh_config.0 >--- openssh-5.2p1.orig/ssh_config.0 2009-02-23 01:18:16.000000000 +0100 >+++ openssh-5.2p1/ssh_config.0 2009-06-09 16:01:36.646938688 +0200 >@@ -596,6 +596,10 @@ > Specifies a file to use for the user host key database instead of > ~/.ssh/known_hosts. > >+ UseSCTP >+ Specifies whether to use transport protocol SCTP instead of TCP. >+ (Works only on SCTP compatible operating systems). >+ > VerifyHostKeyDNS > Specifies whether to verify the remote key using DNS and SSHFP > resource records. If this option is set to ``yes'', the client >diff -ur openssh-5.2p1.orig/ssh_config.5 openssh-5.2p1/ssh_config.5 >--- openssh-5.2p1.orig/ssh_config.5 2009-02-23 00:53:58.000000000 +0100 >+++ openssh-5.2p1/ssh_config.5 2009-06-09 16:01:36.648474315 +0200 >@@ -1040,6 +1040,9 @@ > Specifies a file to use for the user > host key database instead of > .Pa ~/.ssh/known_hosts . >+.It Cm UseSCTP >+Specifies whether to use transport protocol SCTP instead of TCP. >+(Works only on SCTP compatible operating systems). > .It Cm VerifyHostKeyDNS > Specifies whether to verify the remote key using DNS and SSHFP resource > records. >diff -ur openssh-5.2p1.orig/sshconnect.c openssh-5.2p1/sshconnect.c >--- openssh-5.2p1.orig/sshconnect.c 2009-02-01 12:19:54.000000000 +0100 >+++ openssh-5.2p1/sshconnect.c 2009-06-09 16:01:36.649502624 +0200 >@@ -362,6 +362,11 @@ > debug("Connecting to %.200s [%.100s] port %s.", > host, ntop, strport); > >+#ifdef IPPROTO_SCTP >+ if (options.use_sctp) >+ ai->ai_protocol=IPPROTO_SCTP; >+#endif >+ > /* Create a socket for connecting. */ > sock = ssh_create_socket(needpriv, ai); > if (sock < 0) >diff -ur openssh-5.2p1.orig/sshd_config openssh-5.2p1/sshd_config >--- openssh-5.2p1.orig/sshd_config 2008-07-02 14:35:43.000000000 +0200 >+++ openssh-5.2p1/sshd_config 2009-06-09 16:01:36.650525634 +0200 >@@ -104,6 +104,7 @@ > #PidFile /var/run/sshd.pid > #MaxStartups 10 > #PermitTunnel no >+#IPProtocol both > #ChrootDirectory none > > # no default banner path >diff -ur openssh-5.2p1.orig/sshd_config.0 openssh-5.2p1/sshd_config.0 >--- openssh-5.2p1.orig/sshd_config.0 2009-02-23 01:18:15.000000000 +0100 >+++ openssh-5.2p1/sshd_config.0 2009-06-09 16:01:36.652506645 +0200 >@@ -253,6 +253,10 @@ > ~/.ssh/known_hosts during RhostsRSAAuthentication or > HostbasedAuthentication. The default is ``no''. > >+ IPProtocol >+ Specifies IP transport protocol, possible values are tcp, sctp >+ and both. (Works only on SCTP compatible operating systems). >+ > KerberosAuthentication > Specifies whether the password provided by the user for > PasswordAuthentication will be validated through the Kerberos >diff -ur openssh-5.2p1.orig/sshd_config.5 openssh-5.2p1/sshd_config.5 >--- openssh-5.2p1.orig/sshd_config.5 2009-02-23 01:00:24.000000000 +0100 >+++ openssh-5.2p1/sshd_config.5 2009-06-09 16:01:36.653597221 +0200 >@@ -453,6 +453,13 @@ > .Cm HostbasedAuthentication . > The default is > .Dq no . >+.It Cm IPProtocol >+Specifies IP transport protocol, possible values are >+.Cm tcp , >+.Cm sctp >+and >+.Cm both . >+(Works only on SCTP compatible operating systems). > .It Cm KerberosAuthentication > Specifies whether the password provided by the user for > .Cm PasswordAuthentication
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 1604
:
1646
|
2572
|
2573
|
3346