Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 930610 Details for
Bug 1133654
cannot bind a raw socket inside a docker container
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
C program to demonstrate the issue
raw.c (text/x-csrc), 628 bytes, created by
David Wragg
on 2014-08-25 17:46:32 UTC
(
hide
)
Description:
C program to demonstrate the issue
Filename:
MIME Type:
Creator:
David Wragg
Created:
2014-08-25 17:46:32 UTC
Size:
628 bytes
patch
obsolete
>#include <stdio.h> >#include <sys/socket.h> >#include <netinet/in.h> > >int main(int argc, char **argv) >{ > char buf[65535]; > struct sockaddr_in sa; > int s = socket(AF_INET, SOCK_RAW, IPPROTO_TCP); > if (s < 0) { > perror("socket(AF_INET, SOCK_RAW, ...)"); > return 1; > } > > sa.sin_family = AF_INET; > sa.sin_port = 0; > sa.sin_addr.s_addr = htonl(INADDR_LOOPBACK); > if (bind(s, (struct sockaddr *)&sa, sizeof(sa)) < 0) { > perror("bind"); > return 1; > } > > for (;;) { > ssize_t sz = recv(s, buf, 65535, 0); > if (sz < 0) { > perror("recv"); > return 1; > } > > fprintf(stderr, "Got packet of size %u\n", (unsigned)sz); > } > > return 0; >}
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 1133654
: 930610