Bugzilla – Attachment 1105 Details for
Bug 1179
sshd incorrectly rejects remote connections due to IP options
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch I used to fix the problem (probably not optimal, though!)
canohost.c.patch (text/plain), 1.25 KB, created by
Mark Weindling
on 2006-04-01 09:44:30 AEDT
(
hide
)
Description:
Patch I used to fix the problem (probably not optimal, though!)
Filename:
MIME Type:
Creator:
Mark Weindling
Created:
2006-04-01 09:44:30 AEDT
Size:
1.25 KB
patch
obsolete
>*** openssh-4.3p2/canohost.c Fri Dec 30 23:19:54 2005 >--- openssh-4.3p2-/canohost.c Fri Mar 31 16:32:28 2006 >*************** >*** 146,152 **** >--- 146,155 ---- > u_int i; > int ipproto; > struct protoent *ip; >+ u_int option_set; > >+ option_set = 0; >+ > if ((ip = getprotobyname("ip")) != NULL) > ipproto = ip->p_proto; > else >*************** >*** 153,159 **** > ipproto = IPPROTO_IP; > option_size = sizeof(options); > if (getsockopt(sock, ipproto, IP_OPTIONS, options, >! &option_size) >= 0 && option_size != 0) { > text[0] = '\0'; > for (i = 0; i < option_size; i++) > snprintf(text + i*3, sizeof(text) - i*3, >--- 156,172 ---- > ipproto = IPPROTO_IP; > option_size = sizeof(options); > if (getsockopt(sock, ipproto, IP_OPTIONS, options, >! &option_size) >= 0) { >! >! for (i = 0; i < option_size; i++) { >! if (options[i] != 0) { >! option_set = 1; >! break; >! } >! } >! >! if (option_set) { >! > text[0] = '\0'; > for (i = 0; i < option_size; i++) > snprintf(text + i*3, sizeof(text) - i*3, >*************** >*** 160,165 **** >--- 173,179 ---- > " %2.2x", options[i]); > fatal("Connection from %.100s with IP options:%.800s", > ipaddr, text); >+ } > } > #endif /* IP_OPTIONS */ > }
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 1179
: 1105 |
1107