Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

[libshairport] - add patch for fixing fallback from ipv6 to ipv4 (needed... #1573

Merged
merged 1 commit into from

4 participants

@Memphiz
Owner

... where AF_INET6 is defined at buildtime - but ipv6 is not available at runtime - rbpi and openelec on fusion for example) - thx to ribbon10

@gimli could you give this a shot on rbpi before i merge?

with http://wiki.xbmc.org/index.php?title=Userdata/advancedsettings.xml#.3Cenableairtunesdebuglog.3E

you should see somthing like

"20:20:37 T:140102717941568 DEBUG: AIRTUNES: Failed to create ipv6 socket. Trying ipv4"

in the log and it should work.

@Memphiz Memphiz [libshairport] - add patch for fixing fallback from ipv6 to ipv4 (nee…
…ded where AF_INET6 is defined at buildtime - but ipv6 is not available at runtime - rbpi for example) - thx to ribbon10
f5770cd
@Memphiz
Owner

ping @huceke - forgot that "gimli" won't trigger you here ;)

@huceke
Collaborator

@Memphiz quite hard to test. My environment for the PI is IPV6 enabled.

@Memphiz
Owner

so the ipv6 patch was commented out in yourdeps for openelec only?

@huceke
Collaborator

No. I use a buildroot environment ;)

@Memphiz
Owner

I know that - but why was this patch excluded from the rbpi depends?

https://github.com/xbmc/xbmc/blob/master/tools/rbp/depends/libshairport/Makefile#L33

@ribbon10

Tested the patch with RPI and OpenELEC r12056 (that includes xbmc-frodo-f13566b wich have the BXA Demuxer) and it works fine for me.

But I do not know how this behaves on darwin or android.

Just for info OpenELEC has disabled IPv6: https://github.com/OpenELEC/OpenELEC.tv/blob/master/projects/RPi/linux/linux.arm.conf#L479

@Memphiz
Owner

Well i guess (hope) it behaves the same for darwin and android of course. At least it doesn't behave different on ipv6 enabled env (as far as i have tested it on darwin - no android testbox yet).

@ribbon10

Can someone proof that the patch works under IPv6 enabled environments. If so this will minimize the risk a little bit that it breaks something.

@Memphiz
Owner

As said - works same on linux and darwin with ipv6 enabled env.

@sraue
Collaborator

seems to work on OpenELEC too, thanks much

@Memphiz Memphiz merged commit bea0b34 into xbmc:master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Oct 8, 2012
  1. @Memphiz

    [libshairport] - add patch for fixing fallback from ipv6 to ipv4 (nee…

    Memphiz authored
    …ded where AF_INET6 is defined at buildtime - but ipv6 is not available at runtime - rbpi for example) - thx to ribbon10
This page is out of date. Refresh to see the latest.
View
10 lib/libshairport/011_fix_ipv4_fallback.patch
@@ -0,0 +1,10 @@
+--- src/socketlib.c 2012-07-14 22:49:30.000000000 +0200
++++ src/socketlib.c 2012-10-08 21:55:51.000000000 +0200
+@@ -118,6 +118,7 @@
+
+ int tEnable = 1;
+ setsockopt(tSock, SOL_SOCKET, SO_REUSEADDR, &tEnable, sizeof (tEnable));
++ server_addr->ai_addr->sa_family = server_addr->ai_family; // ensure that server_addr has same famliy than the socket
+ if (bind(tSock, server_addr->ai_addr, server_addr->ai_addrlen) < 0)
+ {
+ close(tSock);
View
1  lib/libshairport/Makefile
@@ -46,6 +46,7 @@ $(SOURCE): $(TARBALLS_LOCATION)/$(ARCHIVE)
cd $(SOURCE); patch -p0 < ../008-add-missing-libs.patch
cd $(SOURCE); patch -p0 < ../009_fix_ipv6.patch
cd $(SOURCE); patch -p0 < ../010_handle_metadata.patch
+ cd $(SOURCE); patch -p0 < ../011_fix_ipv4_fallback.patch
cd $(SOURCE); autoreconf -vif
cd $(SOURCE); $(CONFIGURE)
View
10 tools/android/depends/libshairport/011_fix_ipv4_fallback.patch
@@ -0,0 +1,10 @@
+--- src/socketlib.c 2012-07-14 22:49:30.000000000 +0200
++++ src/socketlib.c 2012-10-08 21:55:51.000000000 +0200
+@@ -118,6 +118,7 @@
+
+ int tEnable = 1;
+ setsockopt(tSock, SOL_SOCKET, SO_REUSEADDR, &tEnable, sizeof (tEnable));
++ server_addr->ai_addr->sa_family = server_addr->ai_family; // ensure that server_addr has same famliy than the socket
+ if (bind(tSock, server_addr->ai_addr, server_addr->ai_addrlen) < 0)
+ {
+ close(tSock);
View
1  tools/android/depends/libshairport/Makefile
@@ -34,6 +34,7 @@ $(PLATFORM): $(TARBALLS_LOCATION)/$(ARCHIVE) $(DEPS)
cd $(PLATFORM); patch -p0 < ../008-add-missing-libs.patch
cd $(PLATFORM); patch -p0 < ../009_fix_ipv6.patch
cd $(PLATFORM); patch -p0 < ../010_handle_metadata.patch
+ cd $(PLATFORM); patch -p0 < ../011_fix_ipv4_fallback.patch
cd $(PLATFORM); patch -p0 < ../android.patch
cd $(PLATFORM); $(AUTORECONF) -vif
cd $(PLATFORM); $(CONFIGURE)
View
10 tools/darwin/depends/libshairport/011_fix_ipv4_fallback.patch
@@ -0,0 +1,10 @@
+--- src/socketlib.c 2012-07-14 22:49:30.000000000 +0200
++++ src/socketlib.c 2012-10-08 21:55:51.000000000 +0200
+@@ -118,6 +118,7 @@
+
+ int tEnable = 1;
+ setsockopt(tSock, SOL_SOCKET, SO_REUSEADDR, &tEnable, sizeof (tEnable));
++ server_addr->ai_addr->sa_family = server_addr->ai_family; // ensure that server_addr has same famliy than the socket
+ if (bind(tSock, server_addr->ai_addr, server_addr->ai_addrlen) < 0)
+ {
+ close(tSock);
View
1  tools/darwin/depends/libshairport/Makefile
@@ -32,6 +32,7 @@ $(SOURCE): $(TARBALLS_LOCATION)/$(ARCHIVE)
cd $(SOURCE); patch -p0 < ../008-add-missing-libs.patch
cd $(SOURCE); patch -p0 < ../009_fix_ipv6.patch
cd $(SOURCE); patch -p0 < ../010_handle_metadata.patch
+ cd $(SOURCE); patch -p0 < ../011_fix_ipv4_fallback.patch
cd $(SOURCE); autoreconf -vif
cd $(SOURCE); $(CONFIGURE)
View
10 tools/rbp/depends/libshairport/011_fix_ipv4_fallback.patch
@@ -0,0 +1,10 @@
+--- src/socketlib.c 2012-07-14 22:49:30.000000000 +0200
++++ src/socketlib.c 2012-10-08 21:55:51.000000000 +0200
+@@ -118,6 +118,7 @@
+
+ int tEnable = 1;
+ setsockopt(tSock, SOL_SOCKET, SO_REUSEADDR, &tEnable, sizeof (tEnable));
++ server_addr->ai_addr->sa_family = server_addr->ai_family; // ensure that server_addr has same famliy than the socket
+ if (bind(tSock, server_addr->ai_addr, server_addr->ai_addrlen) < 0)
+ {
+ close(tSock);
View
3  tools/rbp/depends/libshairport/Makefile
@@ -30,8 +30,9 @@ $(SOURCE): $(TARBALLS_LOCATION)/$(ARCHIVE)
cd $(SOURCE); patch -p0 < ../006_no_printf.patch
cd $(SOURCE); patch -p0 < ../007_fix_syslog_defines.patch
cd $(SOURCE); patch -p0 < ../008-add-missing-libs.patch
- #cd $(SOURCE); patch -p0 < ../009_fix_ipv6.patch
+ cd $(SOURCE); patch -p0 < ../009_fix_ipv6.patch
cd $(SOURCE); patch -p0 < ../010_handle_metadata.patch
+ cd $(SOURCE); patch -p0 < ../011_fix_ipv4_fallback.patch
cd $(SOURCE); autoreconf -vif
cd $(SOURCE); $(CONFIGURE)
Something went wrong with that request. Please try again.