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 602489 Details for
Bug 698635
traceroute -- connect: Invalid argument
[?]
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.
[patch]
[Patch] Fix TOS for IPv6
traceroute-2.0.1-ipv6-tos.patch (text/plain), 1.92 KB, created by
Jan Synacek
on 2012-08-06 11:44:37 UTC
(
hide
)
Description:
[Patch] Fix TOS for IPv6
Filename:
MIME Type:
Creator:
Jan Synacek
Created:
2012-08-06 11:44:37 UTC
Size:
1.92 KB
patch
obsolete
>--- a/traceroute/traceroute.c 2012-08-06 13:08:28.000000000 +0200 >+++ b/traceroute/traceroute.c 2012-08-06 13:15:24.938162302 +0200 >@@ -76,6 +76,7 @@ static char **gateways = NULL; > static int num_gateways = 0; > static unsigned char *rtbuf = NULL; > static size_t rtbuf_len = 0; >+static unsigned int ipv6_rthdr_type = 2; /* IPV6_RTHDR_TYPE_2 */ > > static int dontfrag = 0; > static int noresolve = 0; >@@ -221,6 +222,20 @@ static void init_ip_options (void) { > if (!num_gateways) > return; > >+ /* check for TYPE,ADDR,ADDR... form */ >+ if (af == AF_INET6 && num_gateways > 1 && gateways[0]) { >+ char *q; >+ unsigned int value = strtoul (gateways[0], &q, 0); >+ >+ if (!*q) { >+ ipv6_rthdr_type = value; >+ num_gateways--; >+ for (i = 0; i < num_gateways; i++) >+ gateways[i] = gateways[i + 1]; >+ } >+ } >+ >+ > max = af == AF_INET ? MAX_GATEWAYS_4 : MAX_GATEWAYS_6; > if (num_gateways > max) > ex_error ("Too many gateways specified. No more than %d", max); >@@ -276,7 +291,7 @@ static void init_ip_options (void) { > rth = (struct ip6_rthdr *) rtbuf; > rth->ip6r_nxt = 0; > rth->ip6r_len = 2 * num_gateways; >- rth->ip6r_type = IPV6_RTHDR_TYPE_0; >+ rth->ip6r_type = ipv6_rthdr_type; > rth->ip6r_segleft = num_gateways; > > *((u_int32_t *) (rth + 1)) = 0; >@@ -467,7 +482,7 @@ int main (int argc, char *argv[]) { > > if (af == AF_INET6 && (tos || flow_label)) > dst_addr.sin6.sin6_flowinfo = >- ((tos & 0xff) << 20) | (flow_label & 0x000fffff); >+ htonl (((tos & 0xff) << 20) | (flow_label & 0x000fffff)); > > > /* make sure we don't std{in|,out,err} to open sockets */ >@@ -856,6 +871,13 @@ void tune_socket (int sk) { > ) error ("setsockopt IPV6_FLOWLABEL_MGR"); > } > >+ if (tos) { >+ i = tos; >+ if (setsockopt (sk, IPPROTO_IPV6, IPV6_TCLASS, >+ &i, sizeof (i)) < 0 >+ ) error ("setsockopt IPV6_TCLASS"); >+ } >+ > if (tos || flow_label) { > i = 1; > if (setsockopt (sk, IPPROTO_IPV6, IPV6_FLOWINFO_SEND,
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 698635
: 602489