Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 92262 Details for
Bug 136813
iptables binary corrupt with USE=static
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
small test program that produces same symptom
weird_getsockopt.c (text/plain), 1.03 KB, created by
Wormo (RETIRED)
on 2006-07-19 22:48:33 UTC
(
hide
)
Description:
small test program that produces same symptom
Filename:
MIME Type:
Creator:
Wormo (RETIRED)
Created:
2006-07-19 22:48:33 UTC
Size:
1.03 KB
patch
obsolete
>#include <stdio.h> >#include <errno.h> >#include <ctype.h> >#include <iptables.h> > >static int compatible_revision(const char *name, u_int8_t revision, int opt) >{ > struct ipt_get_revision rev; > socklen_t s = sizeof(rev); > int max_rev, sockfd; > > sockfd = socket(AF_INET, SOCK_RAW, IPPROTO_RAW); > if (sockfd < 0) { > fprintf(stderr, "Could not open socket to kernel: %s\n", > strerror(errno)); > exit(1); > } > > strcpy(rev.name, name); > rev.revision = revision; > > max_rev = getsockopt(sockfd, IPPROTO_IP, opt, &rev, &s); > if (max_rev < 0) { > /* Definitely don't support this? */ > if (errno == EPROTONOSUPPORT) { > close(sockfd); > return 0; > } else if (errno == ENOPROTOOPT) { > close(sockfd); > /* Assume only revision 0 support (old kernel) */ > return (revision == 0); > } else { > fprintf(stderr, "getsockopt failed strangely: %s\n", > strerror(errno)); > exit(1); > } > } > close(sockfd); > return 1; >} > >int main(void) >{ > char *name = "multiport"; > u_int8_t revision = 0; > > compatible_revision(name, revision, IPT_SO_GET_REVISION_MATCH); >}
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 Raw
Actions:
View
Attachments on
bug 136813
:
89199
|
89426
|
89443
| 92262 |
92263
|
92264
|
117470