lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Tue, 16 Sep 2014 23:38:47 +0000 From: Maximilian Eschenbacher <maximilian@...henbacher.email> To: linux-kernel@...r.kernel.org Cc: valentina.manea.m@...il.com, shuah.kh@...sung.com, gregkh@...uxfoundation.org, Dominik Paulus <dominik.paulus@....de>, Maximilian Eschenbacher <maximilian@...henbacher.email>, Fjodor Schelichow <fjodor.schelichow@...mail.com>, Johannes Stadlinger <johannes.stadlinger@....de>, Tobias Polzer <tobias.polzer@....de> Subject: [PATCH 10/18] usbip: Separate protocol/program version From: Dominik Paulus <dominik.paulus@....de> Not all new program versions necessarily introduce non-backwards-compatible protocol changes. We thus move the definition of the protocol version from configure.ac to usbip_network.h, where it logically belongs to. Signed-off-by: Maximilian Eschenbacher <maximilian@...henbacher.email> Signed-off-by: Fjodor Schelichow <fjodor.schelichow@...mail.com> Signed-off-by: Johannes Stadlinger <johannes.stadlinger@....de> Signed-off-by: Dominik Paulus <dominik.paulus@....de> Signed-off-by: Tobias Polzer <tobias.polzer@....de> --- tools/usb/usbip/configure.ac | 1 - tools/usb/usbip/src/usbip_network.c | 6 +++--- tools/usb/usbip/src/usbip_network.h | 6 ++++++ 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/tools/usb/usbip/configure.ac b/tools/usb/usbip/configure.ac index 6a8156f..cee780e 100644 --- a/tools/usb/usbip/configure.ac +++ b/tools/usb/usbip/configure.ac @@ -2,7 +2,6 @@ dnl Process this file with autoconf to produce a configure script. AC_PREREQ(2.59) AC_INIT([usbip-utils], [2.0], [linux-usb@...r.kernel.org]) -AC_DEFINE([USBIP_VERSION], [0x00000111], [binary-coded decimal version number]) CURRENT=0 REVISION=1 diff --git a/tools/usb/usbip/src/usbip_network.c b/tools/usb/usbip/src/usbip_network.c index f68741d..6e6216d 100644 --- a/tools/usb/usbip/src/usbip_network.c +++ b/tools/usb/usbip/src/usbip_network.c @@ -157,7 +157,7 @@ int usbip_net_send_op_common(int sockfd, uint32_t code, uint32_t status) memset(&op_common, 0, sizeof(op_common)); - op_common.version = USBIP_VERSION; + op_common.version = PROTOCOL_VERSION; op_common.code = code; op_common.status = status; @@ -187,9 +187,9 @@ int usbip_net_recv_op_common(int sockfd, uint16_t *code) PACK_OP_COMMON(0, &op_common); - if (op_common.version != USBIP_VERSION) { + if (op_common.version != PROTOCOL_VERSION) { dbg("version mismatch: %d %d", op_common.version, - USBIP_VERSION); + PROTOCOL_VERSION); return -ERR_MISMATCH; } diff --git a/tools/usb/usbip/src/usbip_network.h b/tools/usb/usbip/src/usbip_network.h index 151e815..942d1bb 100644 --- a/tools/usb/usbip/src/usbip_network.h +++ b/tools/usb/usbip/src/usbip_network.h @@ -13,6 +13,12 @@ #include <stdint.h> +/* + * Protocol version. Incremented only on non-backwards-compatible + * changes. + */ +#define PROTOCOL_VERSION 0x111 + extern int usbip_port; extern char *usbip_port_string; extern char *usbip_srp_password; -- 2.1.0 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@...r.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists