diff -pruN 1.0-5/debian/changelog 1.0+git20111206-0ubuntu5/debian/changelog
--- 1.0-5/debian/changelog	2017-09-05 12:36:17.000000000 +0000
+++ 1.0+git20111206-0ubuntu5/debian/changelog	2018-04-03 12:29:18.000000000 +0000
@@ -1,20 +1,40 @@
-ipheth (1.0-5) unstable; urgency=low
+ipheth (1.0+git20111206-0ubuntu5) bionic; urgency=high
 
-  * Remove references to obsolete ipeth-dkms package (Closes: #711684, #872322)
-  * Improved documentation (Closes: #766141)
-  * Build against latest usbmuxd (Closes: #728050)
-  * Update udevadm path (Closes: #852563)
-  * Bump standards-version to latest
+  * No change rebuild to pick up -fPIE compiler default
 
- -- Paul McEnery <pmcenery@gmail.com>  Tue, 05 Sep 2017 13:36:17 +0100
+ -- Balint Reczey <rbalint@ubuntu.com>  Tue, 03 Apr 2018 12:29:18 +0000
 
-ipheth (1.0-4) unstable; urgency=low
+ipheth (1.0+git20111206-0ubuntu4) xenial; urgency=medium
 
-  * Remove references to obsolete ipheth-dkms package (Closes: #711684)
-  * Bump standards-version to latest
-  * Patch ipheth-pair to latest git version (Closes: #728050)
+  * Rebuild with the new libimobiledevice soname
 
- -- Paul McEnery <pmcenery@gmail.com>  Mon, 28 Oct 2013 11:38:14 +0000
+ -- Sebastien Bacher <seb128@ubuntu.com>  Thu, 19 Nov 2015 16:27:23 +0100
+
+ipheth (1.0+git20111206-0ubuntu3) saucy; urgency=low
+
+  * No-change rebuild against the latest libimobiledevice
+
+ -- Jeremy Bicha <jbicha@ubuntu.com>  Thu, 08 Aug 2013 12:32:33 -0400
+
+ipheth (1.0+git20111206-0ubuntu2) quantal; urgency=low
+
+  * No change rebuild with the new libimobiledevice
+
+ -- Sebastien Bacher <seb128@ubuntu.com>  Mon, 06 Aug 2012 18:50:10 +0200
+
+ipheth (1.0+git20111206-0ubuntu1) precise; urgency=low
+
+  * New upstream release
+     - GIT snapshot from Dec 6, 2011 (LP: #900802).
+  * debian/patches/modprobe-conf-fix.patch: Fixed path to pairing utility.
+
+ -- Till Kamppeter <till.kamppeter@gmail.com>  Tue, 06 Dec 2011 14:09:28 +0100
+
+ipheth (1.0-3build1) natty; urgency=low
+
+  * No change rebuild against current libimobiledevice
+
+ -- Bhavani Shankar <bhavi@ubuntu.com>  Sat, 15 Jan 2011 12:59:12 +0530
 
 ipheth (1.0-3) unstable; urgency=low
 
diff -pruN 1.0-5/debian/compat 1.0+git20111206-0ubuntu5/debian/compat
--- 1.0-5/debian/compat	2017-09-05 12:36:17.000000000 +0000
+++ 1.0+git20111206-0ubuntu5/debian/compat	2013-08-08 16:33:10.000000000 +0000
@@ -1 +1 @@
-9
+7
diff -pruN 1.0-5/debian/control 1.0+git20111206-0ubuntu5/debian/control
--- 1.0-5/debian/control	2017-09-05 12:36:17.000000000 +0000
+++ 1.0+git20111206-0ubuntu5/debian/control	2013-08-08 16:33:10.000000000 +0000
@@ -1,11 +1,12 @@
 Source: ipheth
 Section: net
 Priority: extra
-Maintainer: Paul McEnery <pmcenery@gmail.com>
-Build-Depends: debhelper (>= 9), libimobiledevice-dev
-Standards-Version: 4.0.0
-Vcs-Git: https://github.com/pmcenery/ipheth-debian.git
-Vcs-Browser: https://github.com/pmcenery/ipheth-debian
+Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
+XSBC-Original-Maintainer: Paul McEnery <pmcenery@gmail.com>
+Build-Depends: debhelper (>= 7.4.2~), libimobiledevice-dev
+Standards-Version: 3.8.4
+Vcs-Git: http://github.com/pmcenery/ipheth-debian.git
+Vcs-Browser: http://github.com/pmcenery/ipheth-debian
 Homepage: http://giagio.com/wiki/moin.cgi/iPhoneEthernetDriver
 
 Package: ipheth-utils
diff -pruN 1.0-5/debian/copyright 1.0+git20111206-0ubuntu5/debian/copyright
--- 1.0-5/debian/copyright	2017-09-05 12:36:17.000000000 +0000
+++ 1.0+git20111206-0ubuntu5/debian/copyright	2013-08-08 16:33:10.000000000 +0000
@@ -1,56 +1,90 @@
-Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
-Upstream-Name: ipheth
-Upstream-Contact: Diego Giagio <diego@giagio.com>
-Source: http://github.com/dgiagio/ipheth/downloads
-
-Files: *
-Copyright: 2009, Diego Giagio <diego@giagio.com>
-           2009, Daniel Borca <dborca@yahoo.com>
-License: GPL-2 or GPL-2+
-
-Files: ipheth-driver/ipheth.c
-Copyright: 2009, Diego Giagio <diego@giagio.com>
-License: GPL-2
-
-Files: ipheth-pair/ipheth-pair.c
-Copyright: 2009, Daniel Borca <dborca@yahoo.com>
-License: GPL-2+
-
-Files: debian/*
-Copyright: 2010 Paul McEnery <pmcenery@gmail.com>
-License: GPL-2
-
-License: GPL-2
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License, v2, as
- published by the Free Software Foundation
- .
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- GNU General Public License for more details.
- .
- You should have received a copy of the GNU General Public License along
- with this program; if not, write to the Free Software Foundation, Inc.,
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- .
- On Debian systems, the complete text of the GNU General Public
- License version 2 can be found in `/usr/share/common-licenses/GPL-2'.
-
-License: GPL-2+
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
- .
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- GNU General Public License for more details.
- .
- You should have received a copy of the GNU General Public License along
- with this program; if not, write to the Free Software Foundation, Inc.,
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- .
- On Debian systems, the complete text of the GNU General Public
- License version 2 can be found in `/usr/share/common-licenses/GPL-2'.
+This package was debianized by:
+
+    Paul McEnery <pmcenery@gmail.com> on Sun, 07 Feb 2010 21:13:09 +0000
+
+It was downloaded from:
+
+    http://github.com/dgiagio/ipheth/downloads
+
+The package is licensed as follows:
+
+----------------------------------------
+ipheth-driver/ipheth.c:
+
+Upstream Author:
+
+    Diego Giagio <diego@giagio.com>
+
+Copyright:
+
+    Copyright © 2009 Diego Giagio / HOLDERS AND CONTRIBUTORS
+
+License:
+
+    Redistribution and use in source and binary forms, with or without
+    modification, are permitted provided that the following conditions
+    are met:
+    1. Redistributions of source code must retain the above copyright
+       notice, this list of conditions and the following disclaimer.
+    2. Redistributions in binary form must reproduce the above copyright
+       notice, this list of conditions and the following disclaimer in the
+       documentation and/or other materials provided with the distribution.
+    3. Neither the name of GIAGIO.COM nor the names of its contributors
+       may be used to endorse or promote products derived from this software
+       without specific prior written permission.
+
+    Alternatively, provided that this notice is retained in full, this
+    software may be distributed under the terms of the GNU General
+    Public License ("GPL") version 2, in which case the provisions of the
+    GPL apply INSTEAD OF those given above.
+
+    The provided data structures and external interfaces from this code
+    are not restricted to be used by modules with a GPL compatible license.
+
+    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+    "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+    LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+    A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+    OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+    SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+    LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+    DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+    THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+    (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+    OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+    DAMAGE.
+     
+----------------------------------------
+ipheth-pair/ipheth-pair.c:
+
+Upstream Author:
+
+    Daniel Borca <dborca@yahoo.com>
+
+Copyright:
+
+    Copyright © 2009 Daniel Borca All rights reserved
+
+License:
+
+    This package is free software; you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation; either version 2 of the License, or
+    (at your option) any later version.
+
+    This package is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this package; if not, write to the Free Software
+    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
+
+----------------------------------------
+
+The Debian packaging is © 2010 Paul McEnery <pmcenery@gmail.com> and
+is licensed under the GNU General Public License version 2.
+
+On Debian systems, the complete text of the GNU General
+Public License version 2 can be found in `/usr/share/common-licenses/GPL-2'.
diff -pruN 1.0-5/debian/patches/000-ipheth-pair-git-latest 1.0+git20111206-0ubuntu5/debian/patches/000-ipheth-pair-git-latest
--- 1.0-5/debian/patches/000-ipheth-pair-git-latest	2017-09-05 12:36:17.000000000 +0000
+++ 1.0+git20111206-0ubuntu5/debian/patches/000-ipheth-pair-git-latest	1970-01-01 00:00:00.000000000 +0000
@@ -1,54 +0,0 @@
-From: Daniel Borca <dborca@yahoo.com>
-Description: Fixed pairing for new firmwares.
- This fix resides in Git, but no new release expected...
-Applied-Upstream: commit 06f5d7d,
- https://github.com/dgiagio/ipheth/commit/06f5d7d159852e2c3d7aff0d565b6ed4966c9539
-Last-Update: 2011-08-18
---- a/ipheth-pair/ipheth-pair.c
-+++ b/ipheth-pair/ipheth-pair.c
-@@ -1,7 +1,7 @@
- /*
-  *  Apple iPhone USB Ethernet pairing program
-  *
-- *  Copyright (c) 2009, 2010 Daniel Borca  All rights reserved.
-+ *  Copyright (c) 2009, 2010, 2011 Daniel Borca  All rights reserved.
-  *
-  * This program is free software; you can redistribute it and/or modify
-  * it under the terms of the GNU General Public License as published by
-@@ -31,6 +31,7 @@
-     const char *myself = argv[0];
-     const char *uuid = NULL;
-     int list = 0;
-+    int oldc = 0;
- 
-     idevice_error_t rv;
-     idevice_t device;
-@@ -39,13 +40,17 @@
-     while (--argc > 0) {
- 	const char *p = *++argv;
- 	if (!strcmp(p, "--help") || !strcmp(p, "-h")) {
--	    printf("usage: %s [--list] [--uuid UUID]\n", myself);
-+	    printf("usage: %s [--list] [--uuid UUID] [--oldc]\n", myself);
- 	    return 0;
- 	}
- 	if (!strcmp(p, "--list") || !strcmp(p, "-l")) {
- 	    list = !0;
- 	    break;
- 	}
-+	if (!strcmp(p, "--oldc") || !strcmp(p, "-o")) {
-+	    oldc = !0;
-+	    break;
-+	}
- 	if (!strcmp(p, "--uuid") || !strcmp(p, "-u")) {
- 	    if (argc < 2) {
- 		fprintf(stderr, "%s: argument to '%s' is missing\n", myself, p);
-@@ -94,7 +99,8 @@
- 	fprintf(stderr, "%s: %d: cannot get %s device\n", myself, rv, uuid ? uuid : "default");
- 	return -1;
-     }
--    rv = lockdownd_client_new(device, &client, "ipheth-pair");
-+    rv = oldc ? lockdownd_client_new(device, &client, "ipheth-pair"):
-+		lockdownd_client_new_with_handshake(device, &client, "ipheth-pair"); /* TrustedHostAttached */
-     if (rv) {
- 	fprintf(stderr, "%s: %d: cannot get lockdown\n", myself, rv);
- 	idevice_free(device);
diff -pruN 1.0-5/debian/patches/001-ipheth-pair-udevadm 1.0+git20111206-0ubuntu5/debian/patches/001-ipheth-pair-udevadm
--- 1.0-5/debian/patches/001-ipheth-pair-udevadm	2017-09-05 12:36:17.000000000 +0000
+++ 1.0+git20111206-0ubuntu5/debian/patches/001-ipheth-pair-udevadm	1970-01-01 00:00:00.000000000 +0000
@@ -1,16 +0,0 @@
-From: Paul McEnery <pmcenery@gmail.com>
-Description: Remove hard coded path to udevadm executable.
- The udevadm executable has moved. Rely on the path now to
- find the correct location of udevadm.
-Last-Update: 2017-09-08
---- ipheth-debian.orig/ipheth-pair/Makefile
-+++ ipheth-debian/ipheth-pair/Makefile
-@@ -8,7 +8,7 @@ ipheth-pair: ipheth-pair.o
- install:
- 	install -m 0755 ipheth-pair /lib/udev/
- 	install -m 0644 90-iphone-tether.rules /etc/udev/rules.d
--	/sbin/udevadm control --reload-rules
-+	udevadm control --reload-rules
- 
- clean:
- 	rm -f *.o ipheth-pair
diff -pruN 1.0-5/debian/patches/modprobe-conf-fix.patch 1.0+git20111206-0ubuntu5/debian/patches/modprobe-conf-fix.patch
--- 1.0-5/debian/patches/modprobe-conf-fix.patch	1970-01-01 00:00:00.000000000 +0000
+++ 1.0+git20111206-0ubuntu5/debian/patches/modprobe-conf-fix.patch	2013-08-08 16:33:10.000000000 +0000
@@ -0,0 +1,9 @@
+--- ipheth-1.0+git20111206.orig/ipheth-driver/ipheth-modprobe.conf
++++ ipheth-1.0+git20111206/ipheth-driver/ipheth-modprobe.conf
+@@ -3,5 +3,4 @@
+ # This configuration forces modprobe to execute device pairing script after
+ # loading the driver.
+ 
+-install ipheth /sbin/modprobe --ignore-install ipheth && /usr/local/bin/ipheth-pair.py
+-
++install ipheth /sbin/modprobe --ignore-install ipheth && /lib/udev/ipheth-pair
diff -pruN 1.0-5/debian/patches/series 1.0+git20111206-0ubuntu5/debian/patches/series
--- 1.0-5/debian/patches/series	2017-09-05 12:36:17.000000000 +0000
+++ 1.0+git20111206-0ubuntu5/debian/patches/series	2013-08-08 16:33:10.000000000 +0000
@@ -1,2 +1 @@
-000-ipheth-pair-git-latest
-001-ipheth-pair-udevadm
+modprobe-conf-fix.patch
diff -pruN 1.0-5/debian/README.Debian 1.0+git20111206-0ubuntu5/debian/README.Debian
--- 1.0-5/debian/README.Debian	2017-09-05 12:36:17.000000000 +0000
+++ 1.0+git20111206-0ubuntu5/debian/README.Debian	2013-08-08 16:33:10.000000000 +0000
@@ -1,25 +1,17 @@
 ipheth for Debian
 -----------------
 
-The Debian version of ipheth provides the following binary package:
+The Debian version of ipheth provides two binary packages:
 
 ipheth-utils - pairing utility for the iPhone tethering Linux kernel driver
+ipheth-dkms - Linux kernel driver that adds support for iPhone tethering
 
-iDevice USB tethering requires the device to be paired with the system
-that it is connected to. There are a number of ways that the device can
-be paired. If your desktop environment supports Apple File Conduit (AFC),
-and allows you to browse the contents of the device via the afc:// location;
-then you probably don't need this package. If however your system doesn't
-have a graphical environment, or doesn't have any other elements that support
-AFC; then this package will be useful for carrying out the initial pairing.
-
-In order for the initial pairing to be successful, the security passcode
-on the device might need to be disabled. Once pairing is complete (see
-dmesg output), the passcode can be re-enabled.
-
-Once paired and connected via USB, the driver which is included in the
-mainline kernel since April 2010 (2.6.34) will present a network device
-to the operarating system for configuration. The network device should
-be visible, and can be configured via ifconfig(8) or similar utilities.
 
- -- Paul McEnery <pmcenery@gmail.com>  Tue, 05 Sep 2017 13:36:17 +0100
+The ipheth-utils package provides the pairing utility and associated udev
+rules for the ipheth Linux kernel driver.
+
+The ipheth-dkms package provides the source code for the ipheth Linux kernel
+driver. The module is automatically built and installed by DKMS for the
+running kernel.
+
+ -- Paul McEnery <pmcenery@gmail.com>  Sat, 23 Jan 2010 21:13:09 +0000
diff -pruN 1.0-5/debian/watch 1.0+git20111206-0ubuntu5/debian/watch
--- 1.0-5/debian/watch	2017-09-05 12:36:17.000000000 +0000
+++ 1.0+git20111206-0ubuntu5/debian/watch	2013-08-08 16:33:10.000000000 +0000
@@ -1,2 +1,2 @@
 version=3
-https://github.com/dgiagio/ipheth/tags .*/(.*)\.tar\.gz
+http://githubredir.debian.net/github/dgiagio/ipheth /([\d\.].*).tar.gz
diff -pruN 1.0-5/ipheth-driver/ipheth.c 1.0+git20111206-0ubuntu5/ipheth-driver/ipheth.c
--- 1.0-5/ipheth-driver/ipheth.c	2010-02-12 21:56:11.000000000 +0000
+++ 1.0+git20111206-0ubuntu5/ipheth-driver/ipheth.c	2011-12-06 13:06:03.000000000 +0000
@@ -44,6 +44,7 @@
  */
 
 #include <linux/kernel.h>
+#include <linux/version.h>
 #include <linux/errno.h>
 #include <linux/init.h>
 #include <linux/slab.h>
@@ -51,38 +52,58 @@
 #include <linux/netdevice.h>
 #include <linux/etherdevice.h>
 #include <linux/ethtool.h>
-#include <asm/uaccess.h>
 #include <linux/usb.h>
 #include <linux/workqueue.h>
 
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,34))
+#define usb_alloc_coherent      usb_buffer_alloc
+#define usb_free_coherent       usb_buffer_free
+#endif
+
 #define USB_VENDOR_APPLE        0x05ac
-#define USB_PRODUCT_IPHETH     0x1290
-#define USB_PRODUCT_IPHETH_3G   0x1292
-#define USB_PRODUCT_IPHETH_3GS  0x1294
+#define USB_PRODUCT_IPHONE      0x1290
+#define USB_PRODUCT_IPHONE_3G   0x1292
+#define USB_PRODUCT_IPHONE_3GS  0x1294
+#define USB_PRODUCT_IPHONE_4    0x1297
 
 #define IPHETH_USBINTF_CLASS    255
 #define IPHETH_USBINTF_SUBCLASS 253
+#define IPHETH_USBINTF_PROTO    1
 
 #define IPHETH_BUF_SIZE         1516
+#define IPHETH_IP_ALIGN         2       /* padding at front of URB */
 #define IPHETH_TX_TIMEOUT       (5 * HZ)
 
 #define IPHETH_INTFNUM          2
 #define IPHETH_ALT_INTFNUM      1
 
 #define IPHETH_CTRL_ENDP        0x00
-#define IPHETH_CTRL_BUF_SIZE	0x40
+#define IPHETH_CTRL_BUF_SIZE    0x40
 #define IPHETH_CTRL_TIMEOUT     (5 * HZ)
 
 #define IPHETH_CMD_GET_MACADDR   0x00
 #define IPHETH_CMD_CARRIER_CHECK 0x45
 
-#define IPHETH_CARRIER_CHECK_TIMEOUT (1 * HZ)
+#define IPHETH_CARRIER_CHECK_TIMEOUT round_jiffies_relative(1 * HZ)
 #define IPHETH_CARRIER_ON       0x04
 
-static struct usb_device_id ipheth_table [] = {
-       { USB_DEVICE(USB_VENDOR_APPLE, USB_PRODUCT_IPHETH) },
-	{ USB_DEVICE(USB_VENDOR_APPLE, USB_PRODUCT_IPHETH_3G) },
-	{ USB_DEVICE(USB_VENDOR_APPLE, USB_PRODUCT_IPHETH_3GS) },
+static struct usb_device_id ipheth_table[] = {
+	{ USB_DEVICE_AND_INTERFACE_INFO(
+		USB_VENDOR_APPLE, USB_PRODUCT_IPHONE,
+		IPHETH_USBINTF_CLASS, IPHETH_USBINTF_SUBCLASS,
+		IPHETH_USBINTF_PROTO) },
+	{ USB_DEVICE_AND_INTERFACE_INFO(
+		USB_VENDOR_APPLE, USB_PRODUCT_IPHONE_3G,
+		IPHETH_USBINTF_CLASS, IPHETH_USBINTF_SUBCLASS,
+		IPHETH_USBINTF_PROTO) },
+	{ USB_DEVICE_AND_INTERFACE_INFO(
+		USB_VENDOR_APPLE, USB_PRODUCT_IPHONE_3GS,
+		IPHETH_USBINTF_CLASS, IPHETH_USBINTF_SUBCLASS,
+		IPHETH_USBINTF_PROTO) },
+	{ USB_DEVICE_AND_INTERFACE_INFO(
+		USB_VENDOR_APPLE, USB_PRODUCT_IPHONE_4,
+		IPHETH_USBINTF_CLASS, IPHETH_USBINTF_SUBCLASS,
+		IPHETH_USBINTF_PROTO) },
 	{ }
 };
 MODULE_DEVICE_TABLE(usb, ipheth_table);
@@ -98,8 +119,8 @@ struct ipheth_device {
 	unsigned char *tx_buf;
 	unsigned char *rx_buf;
 	unsigned char *ctrl_buf;
-	__u8 bulk_in;
-	__u8 bulk_out;
+	u8 bulk_in;
+	u8 bulk_out;
 	struct delayed_work carrier_work;
 };
 
@@ -114,25 +135,25 @@ static int ipheth_alloc_urbs(struct iphe
 
 	tx_urb = usb_alloc_urb(0, GFP_KERNEL);
 	if (tx_urb == NULL)
-		goto error;
+		goto error_nomem;
 
 	rx_urb = usb_alloc_urb(0, GFP_KERNEL);
 	if (rx_urb == NULL)
-		goto error;
+		goto free_tx_urb;
 
-	tx_buf = usb_buffer_alloc(iphone->udev,
+	tx_buf = usb_alloc_coherent(iphone->udev,
 				  IPHETH_BUF_SIZE,
 				  GFP_KERNEL,
 				  &tx_urb->transfer_dma);
 	if (tx_buf == NULL)
-		goto error;
+		goto free_rx_urb;
 
-	rx_buf = usb_buffer_alloc(iphone->udev,
+	rx_buf = usb_alloc_coherent(iphone->udev,
 				  IPHETH_BUF_SIZE,
 				  GFP_KERNEL,
 				  &rx_urb->transfer_dma);
 	if (rx_buf == NULL)
-		goto error;
+		goto free_tx_buf;
 
 
 	iphone->tx_urb = tx_urb;
@@ -141,33 +162,34 @@ static int ipheth_alloc_urbs(struct iphe
 	iphone->rx_buf = rx_buf;
 	return 0;
 
-error:
-	usb_buffer_free(iphone->udev, IPHETH_BUF_SIZE, rx_buf,
-			rx_urb->transfer_dma);
-	usb_buffer_free(iphone->udev, IPHETH_BUF_SIZE, tx_buf,
+free_tx_buf:
+	usb_free_coherent(iphone->udev, IPHETH_BUF_SIZE, tx_buf,
 			tx_urb->transfer_dma);
+free_rx_urb:
 	usb_free_urb(rx_urb);
+free_tx_urb:
 	usb_free_urb(tx_urb);
+error_nomem:
 	return -ENOMEM;
 }
 
-static void ipheth_free_urbs (struct ipheth_device *iphone)
+static void ipheth_free_urbs(struct ipheth_device *iphone)
 {
-	usb_buffer_free(iphone->udev, IPHETH_BUF_SIZE, iphone->rx_buf,
+	usb_free_coherent(iphone->udev, IPHETH_BUF_SIZE, iphone->rx_buf,
 			iphone->rx_urb->transfer_dma);
-	usb_buffer_free(iphone->udev, IPHETH_BUF_SIZE, iphone->tx_buf,
+	usb_free_coherent(iphone->udev, IPHETH_BUF_SIZE, iphone->tx_buf,
 			iphone->tx_urb->transfer_dma);
 	usb_free_urb(iphone->rx_urb);
 	usb_free_urb(iphone->tx_urb);
 }
 
-static void ipheth_unlink_urbs (struct ipheth_device *dev)
+static void ipheth_kill_urbs(struct ipheth_device *dev)
 {
 	usb_kill_urb(dev->tx_urb);
 	usb_kill_urb(dev->rx_urb);
 }
 
-static void ipheth_rcvbulk_callback (struct urb *urb)
+static void ipheth_rcvbulk_callback(struct urb *urb)
 {
 	struct ipheth_device *dev;
 	struct sk_buff *skb;
@@ -188,21 +210,25 @@ static void ipheth_rcvbulk_callback (str
 	case 0:
 		break;
 	default:
-		err("%s: urb status: %d", __func__, urb->status);
+		err("%s: urb status: %d", __func__, status);
 		return;
 	}
 
-	len = urb->actual_length;
-	buf = urb->transfer_buffer;
+	if (urb->actual_length <= IPHETH_IP_ALIGN) {
+		dev->stats.rx_length_errors++;
+		return;
+	}
+	len = urb->actual_length - IPHETH_IP_ALIGN;
+	buf = urb->transfer_buffer + IPHETH_IP_ALIGN;
 
-	if (!(skb = dev_alloc_skb(NET_IP_ALIGN + len))) {
+	skb = dev_alloc_skb(len);
+	if (!skb) {
 		err("%s: dev_alloc_skb: -ENOMEM", __func__);
 		dev->stats.rx_dropped++;
 		return;
 	}
 
-	skb_reserve(skb, NET_IP_ALIGN);
-	memcpy(skb_put(skb, len), buf + NET_IP_ALIGN, len - NET_IP_ALIGN);
+	memcpy(skb_put(skb, len), buf, len);
 	skb->dev = dev->net;
 	skb->protocol = eth_type_trans(skb, dev->net);
 
@@ -213,22 +239,23 @@ static void ipheth_rcvbulk_callback (str
 	ipheth_rx_submit(dev, GFP_ATOMIC);
 }
 
-static void ipheth_sndbulk_callback (struct urb *urb)
+static void ipheth_sndbulk_callback(struct urb *urb)
 {
 	struct ipheth_device *dev;
+	int status = urb->status;
 
 	dev = urb->context;
 	if (dev == NULL)
 		return;
 
-	if (urb->status != 0 &&
-	    urb->status != -ENOENT &&
-	    urb->status != -ECONNRESET &&
-	    urb->status != -ESHUTDOWN)
-		err("%s: urb status: %d", __func__, urb->status);
+	if (status != 0 &&
+	    status != -ENOENT &&
+	    status != -ECONNRESET &&
+	    status != -ESHUTDOWN)
+		err("%s: urb status: %d", __func__, status);
 
-	netif_wake_queue(dev->net);
 	dev_kfree_skb_irq(dev->tx_skb);
+	netif_wake_queue(dev->net);
 }
 
 static int ipheth_carrier_set(struct ipheth_device *dev)
@@ -236,14 +263,15 @@ static int ipheth_carrier_set(struct iph
 	struct usb_device *udev = dev->udev;
 	int retval;
 
-	if ((retval = usb_control_msg(udev, 
-				      usb_rcvctrlpipe(udev, IPHETH_CTRL_ENDP),
-				      IPHETH_CMD_CARRIER_CHECK, /* request */
-				      0xc0, /* request type */
-				      0x00, /* value */
-				      0x02, /* index */
-				      dev->ctrl_buf, IPHETH_CTRL_BUF_SIZE,
-				      IPHETH_CTRL_TIMEOUT)) < 0) {
+	retval = usb_control_msg(udev,
+			usb_rcvctrlpipe(udev, IPHETH_CTRL_ENDP),
+			IPHETH_CMD_CARRIER_CHECK, /* request */
+			0xc0, /* request type */
+			0x00, /* value */
+			0x02, /* index */
+			dev->ctrl_buf, IPHETH_CTRL_BUF_SIZE,
+			IPHETH_CTRL_TIMEOUT);
+	if (retval < 0) {
 		err("%s: usb_control_msg: %d", __func__, retval);
 		return retval;
 	}
@@ -271,7 +299,7 @@ static int ipheth_get_macaddr(struct iph
 	struct net_device *net = dev->net;
 	int retval;
 
-	retval = usb_control_msg(udev, 
+	retval = usb_control_msg(udev,
 				 usb_rcvctrlpipe(udev, IPHETH_CTRL_ENDP),
 				 IPHETH_CMD_GET_MACADDR, /* request */
 				 0xc0, /* request type */
@@ -283,7 +311,8 @@ static int ipheth_get_macaddr(struct iph
 	if (retval < 0) {
 		err("%s: usb_control_msg: %d", __func__, retval);
 	} else if (retval < ETH_ALEN) {
-		err("%s: usb_control_msg: short packet: %d bytes", __func__, retval);
+		err("%s: usb_control_msg: short packet: %d bytes",
+			__func__, retval);
 		retval = -EINVAL;
 	} else {
 		memcpy(net->dev_addr, dev->ctrl_buf, ETH_ALEN);
@@ -305,12 +334,13 @@ static int ipheth_rx_submit(struct iphet
 			  dev);
 	dev->rx_urb->transfer_flags |= URB_NO_TRANSFER_DMA_MAP;
 
-	if ((retval = usb_submit_urb(dev->rx_urb, mem_flags)))
+	retval = usb_submit_urb(dev->rx_urb, mem_flags);
+	if (retval)
 		err("%s: usb_submit_urb: %d", __func__, retval);
 	return retval;
 }
 
-static int ipheth_open (struct net_device *net)
+static int ipheth_open(struct net_device *net)
 {
 	struct ipheth_device *dev = netdev_priv(net);
 	struct usb_device *udev = dev->udev;
@@ -320,19 +350,20 @@ static int ipheth_open (struct net_devic
 	usb_clear_halt(udev, usb_rcvbulkpipe(udev, dev->bulk_in));
 	usb_clear_halt(udev, usb_sndbulkpipe(udev, dev->bulk_out));
 
-	if ((retval = ipheth_carrier_set(dev)))
-		goto error;
+	retval = ipheth_carrier_set(dev);
+	if (retval)
+		return retval;
 
-	if ((retval = ipheth_rx_submit(dev, GFP_KERNEL)))
-		goto error;
+	retval = ipheth_rx_submit(dev, GFP_KERNEL);
+	if (retval)
+		return retval;
 
 	schedule_delayed_work(&dev->carrier_work, IPHETH_CARRIER_CHECK_TIMEOUT);
 	netif_start_queue(net);
-error:
 	return retval;
 }
 
-static int ipheth_close (struct net_device *net)
+static int ipheth_close(struct net_device *net)
 {
 	struct ipheth_device *dev = netdev_priv(net);
 
@@ -341,7 +372,7 @@ static int ipheth_close (struct net_devi
 	return 0;
 }
 
-static int ipheth_tx (struct sk_buff *skb, struct net_device *net)
+static int ipheth_tx(struct sk_buff *skb, struct net_device *net)
 {
 	struct ipheth_device *dev = netdev_priv(net);
 	struct usb_device *udev = dev->udev;
@@ -352,12 +383,13 @@ static int ipheth_tx (struct sk_buff *sk
 		err("%s: skb too large: %d bytes", __func__, skb->len);
 		dev->stats.tx_dropped++;
 		dev_kfree_skb_irq(skb);
-		goto exit;
+		return NETDEV_TX_OK;
 	}
 
-	memset(dev->tx_buf, 0, IPHETH_BUF_SIZE);
 	memcpy(dev->tx_buf, skb->data, skb->len);
-	
+	if (skb->len < IPHETH_BUF_SIZE)
+		memset(dev->tx_buf + skb->len, 0, IPHETH_BUF_SIZE - skb->len);
+
 	usb_fill_bulk_urb(dev->tx_urb, udev,
 			  usb_sndbulkpipe(udev, dev->bulk_out),
 			  dev->tx_buf, IPHETH_BUF_SIZE,
@@ -365,7 +397,8 @@ static int ipheth_tx (struct sk_buff *sk
 			  dev);
 	dev->tx_urb->transfer_flags |= URB_NO_TRANSFER_DMA_MAP;
 
-        if ((retval = usb_submit_urb (dev->tx_urb, GFP_ATOMIC))) {
+	retval = usb_submit_urb(dev->tx_urb, GFP_ATOMIC);
+	if (retval) {
 		err("%s: usb_submit_urb: %d", __func__, retval);
 		dev->stats.tx_errors++;
 		dev_kfree_skb_irq(skb);
@@ -377,11 +410,11 @@ static int ipheth_tx (struct sk_buff *sk
 		dev->stats.tx_bytes += skb->len;
 		netif_stop_queue(net);
 	}
-exit:
+
 	return NETDEV_TX_OK;
 }
 
-static void ipheth_tx_timeout (struct net_device *net)
+static void ipheth_tx_timeout(struct net_device *net)
 {
 	struct ipheth_device *dev = netdev_priv(net);
 
@@ -390,7 +423,7 @@ static void ipheth_tx_timeout (struct ne
 	usb_unlink_urb(dev->tx_urb);
 }
 
-static struct net_device_stats *ipheth_stats (struct net_device *net)
+static struct net_device_stats *ipheth_stats(struct net_device *net)
 {
 	struct ipheth_device *dev = netdev_priv(net);
 	return &dev->stats;
@@ -408,16 +441,16 @@ static struct ethtool_ops ops = {
 
 #ifdef HAVE_NET_DEVICE_OPS
 static const struct net_device_ops ipheth_netdev_ops = {
-       .ndo_open = &ipheth_open,
-       .ndo_stop = &ipheth_close,
-       .ndo_start_xmit = &ipheth_tx,
-       .ndo_tx_timeout = &ipheth_tx_timeout,
-       .ndo_get_stats = &ipheth_stats,
+	.ndo_open = &ipheth_open,
+	.ndo_stop = &ipheth_close,
+	.ndo_start_xmit = &ipheth_tx,
+	.ndo_tx_timeout = &ipheth_tx_timeout,
+	.ndo_get_stats = &ipheth_stats,
 };
 #endif
 
-static int ipheth_probe (struct usb_interface *intf,
-			 const struct usb_device_id *id)
+static int ipheth_probe(struct usb_interface *intf,
+			const struct usb_device_id *id)
 {
 	struct usb_device *udev = interface_to_usbdev(intf);
 	struct usb_host_interface *hintf;
@@ -427,11 +460,6 @@ static int ipheth_probe (struct usb_inte
 	int i;
 	int retval;
 
-	/* Ensure we are probing the right interface */
-	if (intf->cur_altsetting->desc.bInterfaceClass != IPHETH_USBINTF_CLASS ||
-	    intf->cur_altsetting->desc.bInterfaceSubClass != IPHETH_USBINTF_SUBCLASS)
-		return -ENODEV;
-
 	netdev = alloc_etherdev(sizeof(struct ipheth_device));
 	if (!netdev)
 		return -ENOMEM;
@@ -446,6 +474,7 @@ static int ipheth_probe (struct usb_inte
 	netdev->get_stats = &ipheth_stats;
 #endif
 	netdev->watchdog_timeo = IPHETH_TX_TIMEOUT;
+	strcpy(netdev->name, "eth%d");
 
 	dev = netdev_priv(netdev);
 	dev->udev = udev;
@@ -453,7 +482,7 @@ static int ipheth_probe (struct usb_inte
 	dev->intf = intf;
 
 	/* Set up endpoints */
-	hintf = usb_altnum_to_altsetting (intf, IPHETH_ALT_INTFNUM);
+	hintf = usb_altnum_to_altsetting(intf, IPHETH_ALT_INTFNUM);
 	if (hintf == NULL) {
 		retval = -ENODEV;
 		err("Unable to find alternate settings interface");
@@ -479,12 +508,14 @@ static int ipheth_probe (struct usb_inte
 		goto err_alloc_ctrl_buf;
 	}
 
-	if ((retval = ipheth_get_macaddr(dev)))
+	retval = ipheth_get_macaddr(dev);
+	if (retval)
 		goto err_get_macaddr;
 
 	INIT_DELAYED_WORK(&dev->carrier_work, ipheth_carrier_check_work);
 
-	if ((retval = ipheth_alloc_urbs(dev))) {
+	retval = ipheth_alloc_urbs(dev);
+	if (retval) {
 		err("error allocating urbs: %d", retval);
 		goto err_alloc_urbs;
 	}
@@ -494,7 +525,8 @@ static int ipheth_probe (struct usb_inte
 	SET_NETDEV_DEV(netdev, &intf->dev);
 	SET_ETHTOOL_OPS(netdev, &ops);
 
-	if ((retval = register_netdev(netdev))) {
+	retval = register_netdev(netdev);
+	if (retval) {
 		err("error registering netdev: %d", retval);
 		retval = -EIO;
 		goto err_register_netdev;
@@ -521,7 +553,7 @@ static void ipheth_disconnect(struct usb
 	dev = usb_get_intfdata(intf);
 	if (dev != NULL) {
 		unregister_netdev(dev->net);
-		ipheth_unlink_urbs(dev);
+		ipheth_kill_urbs(dev);
 		ipheth_free_urbs(dev);
 		kfree(dev->ctrl_buf);
 		free_netdev(dev->net);
@@ -535,7 +567,6 @@ static struct usb_driver ipheth_driver =
 	.probe =	ipheth_probe,
 	.disconnect =	ipheth_disconnect,
 	.id_table =	ipheth_table,
-	.supports_autosuspend = 0,
 };
 
 static int __init ipheth_init(void)
diff -pruN 1.0-5/ipheth-driver/Makefile 1.0+git20111206-0ubuntu5/ipheth-driver/Makefile
--- 1.0-5/ipheth-driver/Makefile	2010-02-12 21:56:11.000000000 +0000
+++ 1.0+git20111206-0ubuntu5/ipheth-driver/Makefile	2011-12-06 13:06:03.000000000 +0000
@@ -1,12 +1,13 @@
 obj-m += ipheth.o
 
+KERNELDIR ?= /lib/modules/$(shell uname -r)/build
+PWD := $(shell pwd)
+
 all:
-	make -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules
+	make -C $(KERNELDIR) M=$(PWD) modules
 
 clean:
-	make -C /lib/modules/$(shell uname -r)/build M=$(PWD) clean
+	make -C $(KERNELDIR) M=$(PWD) clean
 
 install:
-	make -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules_install
-
-
+	make -C $(KERNELDIR) M=$(PWD) modules_install
diff -pruN 1.0-5/ipheth-pair/ipheth-pair.c 1.0+git20111206-0ubuntu5/ipheth-pair/ipheth-pair.c
--- 1.0-5/ipheth-pair/ipheth-pair.c	2010-02-12 21:56:11.000000000 +0000
+++ 1.0+git20111206-0ubuntu5/ipheth-pair/ipheth-pair.c	2011-12-06 13:06:04.000000000 +0000
@@ -1,7 +1,7 @@
 /*
  *  Apple iPhone USB Ethernet pairing program
  *
- *  Copyright (c) 2009, 2010 Daniel Borca  All rights reserved.
+ *  Copyright (c) 2009, 2010, 2011 Daniel Borca  All rights reserved.
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -31,6 +31,7 @@ main(int argc, char **argv)
     const char *myself = argv[0];
     const char *uuid = NULL;
     int list = 0;
+    int oldc = 0;
 
     idevice_error_t rv;
     idevice_t device;
@@ -39,13 +40,17 @@ main(int argc, char **argv)
     while (--argc > 0) {
 	const char *p = *++argv;
 	if (!strcmp(p, "--help") || !strcmp(p, "-h")) {
-	    printf("usage: %s [--list] [--uuid UUID]\n", myself);
+	    printf("usage: %s [--list] [--uuid UUID] [--oldc]\n", myself);
 	    return 0;
 	}
 	if (!strcmp(p, "--list") || !strcmp(p, "-l")) {
 	    list = !0;
 	    break;
 	}
+	if (!strcmp(p, "--oldc") || !strcmp(p, "-o")) {
+	    oldc = !0;
+	    break;
+	}
 	if (!strcmp(p, "--uuid") || !strcmp(p, "-u")) {
 	    if (argc < 2) {
 		fprintf(stderr, "%s: argument to '%s' is missing\n", myself, p);
@@ -94,7 +99,8 @@ main(int argc, char **argv)
 	fprintf(stderr, "%s: %d: cannot get %s device\n", myself, rv, uuid ? uuid : "default");
 	return -1;
     }
-    rv = lockdownd_client_new(device, &client, "ipheth-pair");
+    rv = oldc ? lockdownd_client_new(device, &client, "ipheth-pair"):
+		lockdownd_client_new_with_handshake(device, &client, "ipheth-pair"); /* TrustedHostAttached */
     if (rv) {
 	fprintf(stderr, "%s: %d: cannot get lockdown\n", myself, rv);
 	idevice_free(device);
