rpms/linux-igd/F-8 linuxigd-1.0-restrict-internal-interface.patch, NONE, 1.1 linux-igd.spec, 1.2, 1.3
HASEGAWA Masahiro (masahase)
fedora-extras-commits at redhat.com
Mon Aug 4 15:42:51 UTC 2008
- Previous message (by thread): rpms/libsoup/devel .cvsignore, 1.34, 1.35 libsoup.spec, 1.69, 1.70 sources, 1.34, 1.35
- Next message (by thread): rpms/linux-igd/F-9 linuxigd-1.0-restrict-internal-interface.patch, NONE, 1.1 linux-igd.spec, 1.3, 1.4
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: masahase
Update of /cvs/pkgs/rpms/linux-igd/F-8
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv20433/F-8
Modified Files:
linux-igd.spec
Added Files:
linuxigd-1.0-restrict-internal-interface.patch
Log Message:
Fix Bug #457730
linuxigd-1.0-restrict-internal-interface.patch:
--- NEW FILE linuxigd-1.0-restrict-internal-interface.patch ---
diff -uNr linuxigd-1.0/util.c linuxigd-1.0-patched/util.c
--- linuxigd-1.0/util.c 2006-08-02 07:48:00.000000000 +0900
+++ linuxigd-1.0-patched/util.c 2008-08-04 23:13:03.000000000 +0900
@@ -8,10 +8,11 @@
#include <netinet/in.h>
#include <sys/ioctl.h>
#include <sys/socket.h>
+#include <unistd.h>
#include "globals.h"
-static int get_sockfd(void)
+static int get_sockfd(const char *ifname)
{
static int sockfd = -1;
@@ -22,18 +23,26 @@
perror("user: socket creating failed");
return (-1);
}
+
+ if (setsockopt(sockfd, SOL_SOCKET, SO_BINDTODEVICE, ifname, sizeof(ifname)))
+ {
+ perror("could not bind to device");
+ close(sockfd);
+ return (-1);
+ }
+
}
return sockfd;
}
-int GetIpAddressStr(char *address, char *ifname)
+int GetIpAddressStr(char *address, const char *ifname)
{
struct ifreq ifr;
struct sockaddr_in *saddr;
int fd;
int succeeded = 0;
- fd = get_sockfd();
+ fd = get_sockfd(ifname);
if (fd >= 0 )
{
strncpy(ifr.ifr_name, ifname, IFNAMSIZ);
diff -uNr linuxigd-1.0/util.h linuxigd-1.0-patched/util.h
--- linuxigd-1.0/util.h 2006-08-02 07:48:00.000000000 +0900
+++ linuxigd-1.0-patched/util.h 2008-08-04 23:13:03.000000000 +0900
@@ -1,8 +1,8 @@
#ifndef _UTIL_H_
#define _UTIL_H_
-int get_sockfd(void);
-int GetIpAddressStr(char *address, char *ifname);
+int get_sockfd(const char *ifname);
+int GetIpAddressStr(char *address, const char *ifname);
void trace(int debuglevel, const char *format, ...);
#endif //_UTIL_H_
Index: linux-igd.spec
===================================================================
RCS file: /cvs/pkgs/rpms/linux-igd/F-8/linux-igd.spec,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- linux-igd.spec 19 Jan 2008 05:42:44 -0000 1.2
+++ linux-igd.spec 4 Aug 2008 15:42:21 -0000 1.3
@@ -3,11 +3,12 @@
Summary: The Linux UPNP Internet GATEWAY DEVICE
Name: linux-igd
Version: 1.0
-Release: 4%{?dist}
+Release: 5%{?dist}
URL: http://linux-igd.sourceforge.net/index.php
Source0: http://downloads.sourceforge.net/%{name}/%{source_name}-%{version}.tar.gz
Patch1: %{source_name}-%{version}.patch
Patch0: %{name}-%{version}-to-cvs20070630.patch
+Patch2: %{source_name}-%{version}-restrict-internal-interface.patch
License: GPL+
Group: System Environment/Daemons
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
@@ -27,6 +28,7 @@
%setup -q -c -n %{name}
%patch0
%patch1
+%patch2
%build
pushd %{source_name}-%{version}
@@ -69,6 +71,8 @@
fi
%changelog
+* Mon Aug 4 2008 Masahiro Hasegawa <masahase at gmail.com> - 1.0-5
+- Fix Bug #457730
* Fri Jan 18 2008 Masahiro Hasegawa <masahase at gmail.com> - 1.0-4
- Merge CVS 20070630
* Tue Dec 25 2007 Masahiro Hasegawa <masahase at gmail.com> - 1.0-3
- Previous message (by thread): rpms/libsoup/devel .cvsignore, 1.34, 1.35 libsoup.spec, 1.69, 1.70 sources, 1.34, 1.35
- Next message (by thread): rpms/linux-igd/F-9 linuxigd-1.0-restrict-internal-interface.patch, NONE, 1.1 linux-igd.spec, 1.3, 1.4
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the fedora-extras-commits
mailing list