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 150855 Details for
Bug 233900
Incorrect salen parameter being given to getnameinfo() causes all calls to fail
[?]
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]
Pass in correct salen values to getnameinfo()
dhcpv6-0.10-salen-2.patch (text/plain), 5.43 KB, created by
Daniel Berrangé
on 2007-03-25 17:37:13 UTC
(
hide
)
Description:
Pass in correct salen values to getnameinfo()
Filename:
MIME Type:
Creator:
Daniel Berrangé
Created:
2007-03-25 17:37:13 UTC
Size:
5.43 KB
patch
obsolete
>diff -rup dhcp-0.10.orig/common.c dhcp-0.10.new/common.c >--- dhcp-0.10.orig/common.c 2007-03-24 14:26:39.000000000 -0400 >+++ dhcp-0.10.new/common.c 2007-03-24 14:31:09.000000000 -0400 >@@ -84,7 +84,7 @@ int debug_thresh; > struct dhcp6_if *dhcp6_if; > struct dns_list dnslist; > static struct host_conf *host_conflist; >-static int in6_matchflags __P((struct sockaddr *, char *, int)); >+static int in6_matchflags __P((struct sockaddr *, size_t, char *, int)); > ssize_t gethwid __P((char *, int, const char *, u_int16_t *)); > static int get_assigned_ipv6addrs __P((char *, char *, > struct dhcp6_optinfo *)); >@@ -398,7 +398,7 @@ getifaddr(addr, ifnam, prefix, plen, str > if (sizeof(*(ifa->ifa_addr)) > sizeof(sin6)) > continue; > >- if (in6_matchflags(ifa->ifa_addr, ifa->ifa_name, ignoreflags)) >+ if (in6_matchflags(ifa->ifa_addr, sizeof(sin6), ifa->ifa_name, ignoreflags)) > continue; > > memcpy(&sin6, ifa->ifa_addr, sizeof(sin6)); >@@ -591,7 +591,7 @@ in6addr2str(in6, scopeid) > sa6.sin6_addr = *in6; > sa6.sin6_scope_id = scopeid; > >- return (addr2str((struct sockaddr *)&sa6, sizeof (*in6))); >+ return (addr2str((struct sockaddr *)&sa6, sizeof (sa6))); > } > > /* return IPv6 address scope type. caller assumes that smaller is narrower. */ >@@ -632,8 +632,9 @@ in6_scope(addr) > } > > static int >-in6_matchflags(addr, ifnam, flags) >+in6_matchflags(addr, addrlen, ifnam, flags) > struct sockaddr *addr; >+ size_t addrlen; > char *ifnam; > int flags; > { >@@ -650,7 +651,7 @@ in6_matchflags(addr, ifnam, flags) > > if (ioctl(s, SIOCGIFFLAGS, &ifr) < 0) { > warn("in6_matchflags: ioctl(SIOCGIFFLAGS, %s)", >- addr2str(addr, sizeof (addr->sa_data))); >+ addr2str(addr, addrlen)); > close(s); > return (-1); > } >Only in dhcp-0.10.new/: common.c~ >Only in dhcp-0.10.new/: dhcp-0.10.orig >diff -rup dhcp-0.10.orig/dhcp6c.c dhcp-0.10.new/dhcp6c.c >--- dhcp-0.10.orig/dhcp6c.c 2007-03-24 14:26:39.000000000 -0400 >+++ dhcp-0.10.new/dhcp6c.c 2007-03-24 14:34:24.000000000 -0400 >@@ -1127,7 +1127,7 @@ client6_recv() > > dprintf(LOG_DEBUG, "%s" "receive %s from %s scope id %d %s", FNAME, > dhcp6msgstr(dh6->dh6_msgtype), >- addr2str((struct sockaddr *)&from, sizeof (((struct sockaddr *)&from)->sa_data)), >+ addr2str((struct sockaddr *)&from, sizeof (from)), > ((struct sockaddr_in6 *)&from)->sin6_scope_id, > ifp->ifname); > >@@ -1152,7 +1152,7 @@ client6_recv() > default: > dprintf(LOG_INFO, "%s" "received an unexpected message (%s) " > "from %s", FNAME, dhcp6msgstr(dh6->dh6_msgtype), >- addr2str((struct sockaddr *)&from, sizeof(((struct sockaddr *)&from)->sa_data))); >+ addr2str((struct sockaddr *)&from, sizeof(from))); > break; > } > >Only in dhcp-0.10.new/: dhcp6c.c~ >Only in dhcp-0.10.orig/: dhcp6r.8.relay_agent >Only in dhcp-0.10.orig/: dhcp6r.c.relay_agent >diff -rup dhcp-0.10.orig/dhcp6relay.c dhcp-0.10.new/dhcp6relay.c >--- dhcp-0.10.orig/dhcp6relay.c 2007-03-24 14:26:39.000000000 -0400 >+++ dhcp-0.10.new/dhcp6relay.c 2007-03-24 14:34:37.000000000 -0400 >@@ -496,7 +496,7 @@ relay6_recv(s, rdevice) > } > > dprintf(LOG_DEBUG, "relay6_recv: from %s, size %d", >- addr2str((struct sockaddr *)&from, sizeof(from.data)), len); >+ addr2str((struct sockaddr *)&from, sizeof(from)), len); > > /* get optional information as ancillary data (if available) */ > for (cm = (struct cmsghdr *)CMSG_FIRSTHDR(&rmh); cm; >Only in dhcp-0.10.new/: dhcp6relay.c~ >Only in dhcp-0.10.orig/: dhcp6r.h.relay_agent >Only in dhcp-0.10.orig/: dhcp6r.sh.dhcp6r_init >Only in dhcp-0.10.orig/: dhcp6r.sysconfig.dhcp6r_init >diff -rup dhcp-0.10.orig/dhcp6s.c dhcp-0.10.new/dhcp6s.c >--- dhcp-0.10.orig/dhcp6s.c 2007-03-24 14:26:39.000000000 -0400 >+++ dhcp-0.10.new/dhcp6s.c 2007-03-24 14:36:35.000000000 -0400 >@@ -569,7 +569,7 @@ server6_recv(s) > > dprintf(LOG_DEBUG, "%s" "received %s from %s", FNAME, > dhcp6msgstr(dh6->dh6_msgtype), >- addr2str((struct sockaddr *)&from, sizeof(((struct sockaddr *)&from)->sa_data))); >+ addr2str((struct sockaddr *)&from, sizeof(from))); > > dhcp6_init_options(&optinfo); > >@@ -1076,15 +1076,15 @@ server6_send(type, ifp, origmsg, optinfo > > dst.sin6_scope_id = ((struct sockaddr_in6 *)from)->sin6_scope_id; > dprintf(LOG_DEBUG, "send destination address is %s, scope id is %d", >- addr2str((struct sockaddr *)&dst, sizeof(dst.sin6_addr)), dst.sin6_scope_id); >+ addr2str((struct sockaddr *)&dst, sizeof(dst)), dst.sin6_scope_id); > if (transmit_sa(outsock, &dst, replybuf, len) != 0) { > dprintf(LOG_ERR, "%s" "transmit %s to %s failed", FNAME, >- dhcp6msgstr(type), addr2str((struct sockaddr *)&dst, sizeof(dst.sin6_addr))); >+ dhcp6msgstr(type), addr2str((struct sockaddr *)&dst, sizeof(dst))); > return (-1); > } > > dprintf(LOG_DEBUG, "%s" "transmit %s to %s", FNAME, >- dhcp6msgstr(type), addr2str((struct sockaddr *)&dst, sizeof(dst.sin6_addr))); >+ dhcp6msgstr(type), addr2str((struct sockaddr *)&dst, sizeof(dst))); > > return 0; > } >Only in dhcp-0.10.new/: dhcp6s.c~ >Only in dhcp-0.10.orig/: htonl.h.warnings >Only in dhcp-0.10.orig/libdhcp6client: dhc6_alloc.c.libdhcp6client >Only in dhcp-0.10.orig/libdhcp6client: dhc6_alloc.h.libdhcp6client >Only in dhcp-0.10.orig/libdhcp6client: dhcp6client.h.libdhcp6client >Only in dhcp-0.10.orig/libdhcp6client: libdhcp_control.h.libdhcp6client >Only in dhcp-0.10.orig/: relay6_database.c.relay_agent >Only in dhcp-0.10.orig/: relay6_database.h.relay_agent >Only in dhcp-0.10.orig/: relay6_parser.c.relay_agent >Only in dhcp-0.10.orig/: relay6_parser.h.relay_agent >Only in dhcp-0.10.orig/: relay6_socket.c.relay_agent >Only in dhcp-0.10.orig/: relay6_socket.h.relay_agent
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 233900
: 150855