[Debian-iot-packaging] [oor] 02/04: Import Debian changes 1.1.1+ds1-1

Thorsten Alteholz alteholz at moszumanska.debian.org
Sun Sep 24 20:33:50 UTC 2017


This is an automated email from the git hooks/post-receive script.

alteholz pushed a commit to branch master
in repository oor.

commit 52300548eb6ae6569f180c57b8a62338eb77d9f0
Author: Thorsten Alteholz <debian at alteholz.de>
Date:   Sun Feb 12 18:10:00 2017 +0100

    Import Debian changes 1.1.1+ds1-1
    
    openoverlayrouter (1.1.1+ds1-1) unstable; urgency=medium
    
      * Initial release (Closes: #853880)
---
 debian/changelog                       |   5 +
 debian/compat                          |   1 +
 debian/control                         |  30 ++++
 debian/copyright                       |  96 +++++++++++
 debian/oor.conf                        | 297 +++++++++++++++++++++++++++++++++
 debian/openoverlayrouter.install       |   1 +
 debian/patches/change-prefix.patch     |  16 ++
 debian/patches/compiler-warnings.patch | 162 ++++++++++++++++++
 debian/patches/do-not-call.patch       |  15 ++
 debian/patches/hardening.patch         |  16 ++
 debian/patches/series                  |   5 +
 debian/patches/spelling.patch          | 198 ++++++++++++++++++++++
 debian/rules                           |  13 ++
 debian/source/format                   |   1 +
 debian/watch                           |   5 +
 15 files changed, 861 insertions(+)

diff --git a/debian/changelog b/debian/changelog
new file mode 100644
index 0000000..8948d58
--- /dev/null
+++ b/debian/changelog
@@ -0,0 +1,5 @@
+openoverlayrouter (1.1.1+ds1-1) unstable; urgency=medium
+
+  * Initial release (Closes: #853880)
+
+ -- Thorsten Alteholz <debian at alteholz.de>  Sun, 12 Feb 2017 18:10:00 +0100
diff --git a/debian/compat b/debian/compat
new file mode 100644
index 0000000..f599e28
--- /dev/null
+++ b/debian/compat
@@ -0,0 +1 @@
+10
diff --git a/debian/control b/debian/control
new file mode 100644
index 0000000..b44a896
--- /dev/null
+++ b/debian/control
@@ -0,0 +1,30 @@
+Source: openoverlayrouter
+Maintainer: Thorsten Alteholz <debian at alteholz.de>
+Section: network
+Priority: optional
+Build-Depends: debhelper (>=10)
+	, dh-exec (>=0.2)
+        , quilt
+	, libzmq3-dev
+	, libconfuse-dev
+	, libcap2-bin
+	, gengetopt
+	, libxml2-dev
+Standards-Version: 3.9.8
+Homepage: http://openoverlayrouter.org/
+
+Package: openoverlayrouter
+Section: misc
+Architecture: any
+Depends: ${misc:Depends}, ${shlibs:Depends} 
+Description: deploy programmable overlay networks
+ The OpenOverlayRouter (OOR) project aims to deliver a flexible and modular
+ open-source implementation to deploy programmable overlay networks. It
+ leverages on encapsulating overlay-specific packets into underlay-compatible
+ packets at the edges of the instantiated overlay and route them over the
+ physical underlying infrastructure. In order to do so, it maps overlay
+ identifiers to underlay locators and keeps those mappings updated over 
+ time. In the current version, OOR uses the LISP protocol for the 
+ control-plane (e.g. mapping retrieval and updating, etc), NETCONF/YANG for 
+ the management-plane (e.g. overlay identifiers provisioning, etc) and can 
+ use both LISP and VXLAN-GPE headers for encapsulation. 
diff --git a/debian/copyright b/debian/copyright
new file mode 100644
index 0000000..5268dac
--- /dev/null
+++ b/debian/copyright
@@ -0,0 +1,96 @@
+Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Upstream-Name: openoverlayrouter
+Upstream-Contact: Albert López 
+Source: https://github.com/OpenOverlayRouter/oor
+Files-Excluded: android/* openWRT/*
+
+Files: *
+Copyright: 2011, 2015 Cisco Systems, Inc.
+           2015 CBA research group, Technical University of Catalonia.
+License: Apache-2.0
+
+Files: oor/elibs/khash/*
+Copyright: 2008, 2009, 2011 by Attractive Chaos <attractor at live.co.uk>
+License: Expat
+
+Files: oor/elibs/ovs/*
+Copyright: 2011, 2015 Cisco Systems, Inc.
+           2015 CBA research group, Technical University of Catalonia.
+           2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Nicira, Inc.
+License: Apache-2.0
+
+Files: oor/elibs/mbedtls/*
+Copyright: 2011, 2015 Cisco Systems, Inc.
+           2015 CBA research group, Technical University of Catalonia.
+	   2006-2015, ARM Limited, All Rights Reserved
+License: Apache-2.0
+
+Files: netconf/ietf-inet-types.yang
+	netconf/iana-afn-safi.yin
+	netconf/lispsimple.yang
+	netconf/iana-afn-safi.yang
+	netconf/ietf-yang-types.yang
+Copyright: 2010 IETF Trust
+License: BSD-2
+
+License: BSD-2
+ 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.
+ .
+ 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 
+ HOLDER 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.
+
+License: Apache-2.0
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+ .
+  http://www.apache.org/licenses/LICENSE-2.0
+ .
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ .
+ On Debian systems, the full text of the Apache License version 2.0 can be
+ found in the file `/usr/share/common-licenses/Apache-2.0'.
+
+License: Expat
+ Permission is hereby granted, free of charge, to any person obtaining
+ a copy of this software and associated documentation files (the
+ "Software"), to deal in the Software without restriction, including
+ without limitation the rights to use, copy, modify, merge, publish,
+ distribute, sublicense, and/or sell copies of the Software, and to
+ permit persons to whom the Software is furnished to do so, subject to
+ the following conditions:
+ .
+ The above copyright notice and this permission notice shall be
+ included in all copies or substantial portions of the Software.
+ .
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+ BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ SOFTWARE.
+
diff --git a/debian/oor.conf b/debian/oor.conf
new file mode 100644
index 0000000..74f3827
--- /dev/null
+++ b/debian/oor.conf
@@ -0,0 +1,297 @@
+################################################
+#
+# General configuration
+#
+# debug: Debug levels [0..3]
+# map-request-retries: Additional Map-Requests to send per map cache miss
+# log-file: Specifies log file used in daemon mode. If it is not specified,  
+#   messages are written in syslog file
+
+debug                  = 0 
+map-request-retries    = 2
+log-file               = /var/log/oor.log
+ 
+# Define the type of LISP device LISPmob will operate as 
+#
+# operating-mode can be any of:
+# xTR, RTR, MN, MS
+#
+operating-mode         = xTR
+
+# For the rest of this file you can delete the sections that does not apply to 
+# the LISP device selected in operating-mode
+
+
+################################################
+#
+# MS configuration
+#
+
+# Control messages are received and generated through this interface
+# Only one interface is supported
+
+control-iface = <iface name>FIXME
+
+# Define an allowed lisp-site to be registered into the Map Server. Several
+# lisp-site can be defined.
+# 
+#   eid-prefix: Accepted EID prefix (IPvX/mask)
+#   key-type: Only 1 supported (HMAC-SHA-1-96)
+#   key: Password to authenticate the received Map-Registers
+#   iid: Instance ID associated with the lisp site [0-16777215]
+#   accept-more-specifics [true/false]: Accept more specific prefixes
+#     with same authentication information 
+
+lisp-site {
+    eid-prefix            = <prefix>FIXME
+    key-type              = 1
+    key                   = <string>FIXME
+    iid                   = 0
+    accept-more-specifics = <bool>FIXME
+}
+
+# Define a static registered mapping. New Map-Registers overwrites
+# the information of this mapping. You can define several eid-prefix.
+#   eid-prefix: EID prefix (IPvX/mask) of the mapping
+#   iid: Instance ID associated with the lisp site [0-16777215]
+#   address: It could be one of the following cases
+#      - IPv4 or IPv6 address of the RLOC
+#      - ELP name
+#   priority [0-255]: Priority for the RLOC of the interface. Locators
+#     with lower values are more preferable. This is used for both incoming
+#     policy announcements and outgoing traffic policy management
+#   weight [0-255]: When priorities are the same for multiple RLOCs, the weight
+#     indicates how to balance unicast traffic between them
+
+ms-static-registered-site {
+    eid-prefix          = <prefix>FIXME
+    iid                 = 0
+     rloc-address {
+        address         = <string>FIXME
+        priority        = <int>FIXME
+        weight          = <int>FIXME
+    }
+}
+
+###############################################
+#
+# Tunnel Router general configuration
+# Common for xTR, RTR & MN
+#
+
+# encapsulation: Encapsulation that will use OOR in the data plane. Could be
+#   LISP or VXLAN-GPE. LISP is selected by default
+
+encapsulation          = <LISP/VXLAN-GPE>FIXME
+
+
+# RLOC probing configuration
+#   rloc-probe-interval: interval at which periodic RLOC probes are sent
+#     (seconds). A value of 0 disables RLOC probing
+#   rloc-probe-retries: RLOC probe retries before setting the locator with
+#     status down. [0..5]
+#   rloc-probe-retries-interval: interval at which RLOC probes retries are
+#     sent (seconds) [1..rloc-probe-interval]
+
+rloc-probing {
+    rloc-probe-interval             = 30
+    rloc-probe-retries              = 2
+    rloc-probe-retries-interval     = 5
+}
+
+# Encapsulated Map-Requests are sent to this Map-Resolver
+# You can define several Map-Resolvers, seprated by comma. Encapsulated 
+# Map-Request messages will be sent to only one.
+#   address: IPv4 or IPv6 address of the map-resolver  
+
+map-resolver        = {
+	<ip-address>FIXME
+}
+
+# Static Map Entry of the Map Cache. Several eid-prefix can be defined.
+#   eid-prefix: EID prefix (ip-prefix/mask) of the mapping
+#   iid: Instance ID associated to the EID. When using VXLAN-GPE, iid configures
+#     the VNI of the mapping. [0-16777215]
+#   address: It could be one of the following cases
+#      - IPv4 or IPv6 address of the RLOC
+#      - ELP name
+#   priority [0-255]: Priority for the RLOC. Locators with
+#     lower values are more preferable. This is used for both incoming
+#     policy announcements and outgoing traffic policy management.
+#   weight [0-255]: When priorities are the same for multiple RLOCs, the weight
+#     indicates how to balance unicast traffic between them.
+
+static-map-cache {
+    eid-prefix          = <ip-prefix/mask>FIXME
+    iid                 = 0
+    rloc-address {
+        address         = <string>FIXME
+        priority        = <int>FIXME
+        weight          = <int>FIXME
+    }
+}
+
+###############################################
+#
+# RTR configuration
+#
+
+# List of interfaces to be used as outgoing interfaces for the packets sent
+# by the RTR. Several rtr-ifaces can be defined. 
+#   iface: interface containing the RLOCs to be used for outgoing traffic 
+#   ip_version: 4 to use the IPv4 address of the interface and 6 to use the IPv6 
+#     address of the interface
+#   priority [0-255]: Priority for the RLOC of the interface. Locators
+#     with lower values are more preferable. This is used for outgoing
+#     traffic policy management.
+#   weight [0-255]: When priorities are the same for multiple RLOCs, the weight
+#     indicates how to balance unicast traffic between them.
+
+rtr-ifaces {
+    rtr-iface {
+        iface           = <iface-name>FIXME
+        ip_version      = <4/6>FIXME
+        priority        = <int>FIXME
+        weight          = <int>FIXME
+    }
+}
+
+###############################################
+#
+# xTR & MN configuration
+#
+
+# NAT Traversl configuration. 
+#   nat_traversal_support: check if the node is behind NAT.
+
+nat_traversal_support  = off
+
+# Map-Registers are sent to this Map-Server
+# You can define several Map-Servers. Map-Register messages will be sent to all
+# of them.
+#   address: IPv4 or IPv6 address of the map-server
+#   key-type: Only 1 supported (HMAC-SHA-1-96)
+#   key: password to authenticate with the map-server
+#   proxy-reply [on/off]: Configure map-server to Map-Reply on behalf of the xTR
+
+map-server {
+        address        = <ip-address>FIXME
+        key-type       = 1
+        key            = <password>FIXME
+        proxy-reply    = <on/off>FIXME
+}
+
+# Packets addressed to non-LISP sites will be encapsulated to this Proxy-ETR
+# You can define several Proxy-ETR. Traffic will be balanced according to the
+# priority and weight.
+#   address: IPv4 or IPv6 address of the Proxy-ETR
+#   priority [0-255]: Proxy-ETR with lower values are more preferable.
+#   weight [0-255]: When priorities are the same for multiple Proxy-ETRs,
+#     the weight indicates how to balance unicast traffic between them.
+
+proxy-etr {
+        address     = <ip-address>FIXME
+        priority    = <int>FIXME
+        weight      = <int>FIXME
+}
+
+# IPv4 / IPv6 EID of the node.
+#   eid-prefix: EID prefix (ip-prefix/mask) of the mapping
+#   iid: Instance ID associated to the EID. When using VXLAN-GPE, iid configures
+#     the VNI of the mapping. [0-16777215]
+# Two types of RLOCs can be defined:
+#   rloc-address: Specifies directly the RLOC of the interface
+#     address: It could be one of the following cases
+#       - IPv4 or IPv6 address of the RLOC. Address should exist and
+#        be assigned to an UP interface during startup process otherwise
+#        it is discarded.
+#       - ELP name
+#   rloc-iface: Specifies the interface associated with the RLOC
+#     interface: interface containing the RLOCs associated to this mapping 
+#     ip_version: 4 to use the IPv4 address of the interface and 6 to use the IPv6 
+#       address of the interface
+# Both types of RLOCs use priority and weight
+#   priority [0-255]: Priority for the RLOC of the interface. Locators
+#     with lower values are more preferable. This is used for both incoming
+#     policy announcements and outgoing traffic policy management.
+#   weight [0-255]: When priorities are the same for multiple RLOCs, the weight
+#     indicates how to balance unicast traffic between them.
+
+database-mapping {
+    eid-prefix          = <ip-prefix/mask>FIXME
+    iid                 = 0
+    rloc-address {
+        address         = <string>FIXME
+        priority        = <int>FIXME
+        weight          = <int>FIXME
+    }
+    rloc-iface{
+        interface       = <string>FIXME
+        ip_version      = <4/6>FIXME
+        priority        = <int>FIXME
+        weight          = <int>FIXME
+    }
+}
+
+# Current LISP beta-network (lisp4.net/lisp6.net) PITR addresses
+# Uncomment the IPv4 or IPv6 list based on your current locators and
+# comment the previous 'proxy-itrs' section
+
+
+#proxy-itrs = {
+# LISP beta-network IPv4 PITRs
+#        69.31.31.98,                 # eqx-ash-pxtr
+#        149.20.48.60,                # isc-pxtr
+#        198.6.255.37,                # asp-pxtr
+#        173.36.193.25,               # sjc-pxtr
+#        129.250.1.63,                # ntt-amer-pxtr
+#        217.8.98.33,                 # intouch-pxtr-1
+#        217.8.98.35,                 # intouch-pxtr-2
+#        193.162.145.46,              # tdc-pxtr
+#        158.38.1.92,                 # uninett-pxtr
+#        203.181.249.172,             # apan-pxtr
+#        202.51.247.10                # sg-nus-pxtr
+# LISP beta-network IPv6 PITRs 
+#        2001:590::451f:1f62,         # eqx-ash-pxtr
+#        2001:4f8:3:d::60,            # isc-pxtr
+#        2001:418:4:1:deaf:bebe::10d, # asp-pxtr
+#        2001:418:0:1000::613,        # ntt-amer-pxtr
+#        2001:200:e000:17::17,        # intouch-pxtr-1
+#        2001:67C:21B4:108::b,        # intouch-pxtr-2
+#        2001:6c8:41:100:0:2:1:c,     # tdc-pxtr
+#        2001:700:0:52E::4,           # uninett-pxtr
+#        2001:67C:21B4:107::b         # apan-pxtr
+#}
+
+###############################################
+#
+# Miscellaneous configuration
+#
+
+# Structure to define a path involving multiple hops
+#   elp-name: Name to define the ELP used as a reference in the rest of the 
+#     configuration
+#   elp-node: Defines each of the hops of the ELP. Several ones can be defined.
+#     In most cases, the last elp-node would be the local RLOC of an xTR
+#   address: IPv4 or IPv6 address of the RLOC. The address of the last elp-node 
+#     should exist and be assigned to an UP interface during startup process 
+#     otherwise it is discarded.
+#   strict [true/false]: Not yet implemented. Use false
+#   probe [true/false]: Not yet implemented. Use false
+#   lookup [true/false]: Not yet implemented. Use false
+
+explicit-locator-path {
+    elp-name        = <string>FIXME
+    elp-node {
+        address     = <ip-address>FIXME
+        strict      = <bool>FIXME
+        probe       = <bool>FIXME
+        lookup      = <bool>FIXME
+    }
+    elp-node {
+        address     = <ip-address>FIXME
+        strict      = <bool>FIXME
+        probe       = <bool>FIXME
+        lookup      = <bool>FIXME
+    } 
+}
diff --git a/debian/openoverlayrouter.install b/debian/openoverlayrouter.install
new file mode 100644
index 0000000..bd62c5d
--- /dev/null
+++ b/debian/openoverlayrouter.install
@@ -0,0 +1 @@
+debian/oor.conf etc
diff --git a/debian/patches/change-prefix.patch b/debian/patches/change-prefix.patch
new file mode 100644
index 0000000..8cb97e3
--- /dev/null
+++ b/debian/patches/change-prefix.patch
@@ -0,0 +1,16 @@
+Author: Thorsten Alteholz <debian at alteholz.de>
+Description: move software to /usr/sbin
+Index: OpenOverlayRouter/oor/Makefile
+===================================================================
+--- OpenOverlayRouter.orig/oor/Makefile	2017-01-26 12:56:03.000000000 +0100
++++ OpenOverlayRouter/oor/Makefile	2017-01-27 09:58:44.033440179 +0100
+@@ -105,7 +105,8 @@
+ endif
+ 
+ EXE        	= oor
+-PREFIX      = /usr/local/sbin
++#XXX original: PREFIX      = /usr/local/sbin
++PREFIX      = /usr/sbin
+ INCLUDE     = -I. -Iliblisp -Ielibs -Ilib -Icontrol -Idata-tun -Ifwd_balancing -Ifwd_balancing/flow_balancing
+ 
+ $(EXE): $(OBJS)
diff --git a/debian/patches/compiler-warnings.patch b/debian/patches/compiler-warnings.patch
new file mode 100644
index 0000000..b304b89
--- /dev/null
+++ b/debian/patches/compiler-warnings.patch
@@ -0,0 +1,162 @@
+Author: Thorsten Alteholz <debian at alteholz.de>A
+Description: take care of compiler warnings
+Index: OpenOverlayRouter/oor/config/oor_config_functions.c
+===================================================================
+--- OpenOverlayRouter.orig/oor/config/oor_config_functions.c	2017-01-31 14:25:31.493309149 +0100
++++ OpenOverlayRouter/oor/config/oor_config_functions.c	2017-01-31 14:26:32.935784418 +0100
+@@ -1004,7 +1004,7 @@
+     locator_t *locator;
+     glist_t *addr_list;
+     lisp_addr_t *eid_prefix, *ip_eid_prefix;
+-    lisp_xtr_t *xtr;
++    lisp_xtr_t *xtr=NULL;
+     conf_loc_t *conf_loc;
+     conf_loc_iface_t *conf_loc_iface;
+     glist_entry_t *conf_it;
+Index: OpenOverlayRouter/oor/data-plane/tun/tun.c
+===================================================================
+--- OpenOverlayRouter.orig/oor/data-plane/tun/tun.c	2016-09-16 11:18:01.000000000 +0200
++++ OpenOverlayRouter/oor/data-plane/tun/tun.c	2017-01-31 14:39:13.150415957 +0100
+@@ -120,6 +120,8 @@
+     case ENCP_VXLAN_GPE:
+         data_port = VXLAN_GPE_DATA_PORT;
+         break;
++    default:
++        return (BAD);
+     }
+ 
+     /* Generate receive sockets for data port (4341) */
+@@ -910,6 +912,11 @@
+             sckt = iface->out_socket_v6;
+             iface_addr = iface->ipv6_address;
+             break;
++	default:
++	    /* basically to calm compiler and let the following fail for AF_INET7 */
++	    sckt=0;
++	    iface_addr=0;
++	    break;
+         }
+ 
+         if (iface->status == UP) {
+@@ -932,6 +939,11 @@
+             sckt = iface->out_socket_v6;
+             iface_addr = iface->ipv6_address;
+             break;
++	default:
++	    /* basically to calm compiler and let the following fail for AF_INET7 */
++	    sckt=0;
++	    iface_addr=0;
++	    break;
+         }
+ 
+         del_rule(new_addr_ip_afi, 0, iface->iface_index, iface->iface_index, RTN_UNICAST,
+Index: OpenOverlayRouter/oor/liblisp/lisp_address.c
+===================================================================
+--- OpenOverlayRouter.orig/oor/liblisp/lisp_address.c	2017-01-31 14:25:31.493309149 +0100
++++ OpenOverlayRouter/oor/liblisp/lisp_address.c	2017-01-31 14:43:48.649520932 +0100
+@@ -608,11 +608,15 @@
+         afi_b = lisp_addr_ip_afi(addr2);
+         break;
+     case LM_AFI_IPPREF:
+-        OOR_LOG(LDBG_1,"locator_list_cmp_afi: No locators of type prefix");
++        OOR_LOG(LDBG_1,"lisp_addr_cmp_afi: No locators of type prefix");
+         return (-2);
+     case LM_AFI_LCAF:
+         afi_a = lisp_addr_lcaf_type(addr1);
+         afi_b = lisp_addr_lcaf_type(addr2);
++	break;
++    default:
++        OOR_LOG(LDBG_1,"lisp_addr_cmp_afi: wrong AFI");
++	return (-2);
+     }
+ 
+     if (afi_a > afi_b){
+Index: OpenOverlayRouter/oor/lib/sockets-util.c
+===================================================================
+--- OpenOverlayRouter.orig/oor/lib/sockets-util.c	2016-09-16 11:18:01.000000000 +0200
++++ OpenOverlayRouter/oor/lib/sockets-util.c	2017-01-31 14:48:13.288189327 +0100
+@@ -303,6 +303,8 @@
+         slen = sizeof(struct sockaddr_in6);
+         saddr = (struct sockaddr *)&sa6;
+         break;
++    default:
++	return(BAD);
+     }
+ 
+     nbytes = sendto(socket, pkt, plen, 0, saddr, slen);
+Index: OpenOverlayRouter/oor/cmdline.c
+===================================================================
+--- OpenOverlayRouter.orig/oor/cmdline.c	2017-01-31 14:21:05.906600669 +0100
++++ OpenOverlayRouter/oor/cmdline.c	2017-01-31 14:51:33.872276016 +0100
+@@ -403,13 +403,11 @@
+                const char *long_opt, char short_opt,
+                const char *additional_error)
+ {
+-  char *stop_char = 0;
+   const char *val = value;
+   int found;
+   char **string_field;
+   FIX_UNUSED (field);
+ 
+-  stop_char = 0;
+   found = 0;
+ 
+   if (!multiple_option && prev_given && (*prev_given || (check_ambiguity && *field_given)))
+@@ -484,6 +482,8 @@
+ }
+ 
+ 
++/*
++ * function is currently not used
+ static int check_modes(
+   int given1[], const char *options1[],
+                        int given2[], const char *options2[])
+@@ -506,6 +506,8 @@
+   
+   return errors;
+ }
++*/
++
+ 
+ int
+ cmdline_parser_internal (
+@@ -519,14 +521,14 @@
+   
+   int override;
+   int initialize;
+-  int check_required;
++  /* not needed at the moment: int check_required; */
+   int check_ambiguity;
+   
+   package_name = argv[0];
+   
+   override = params->override;
+   initialize = params->initialize;
+-  check_required = params->check_required;
++  /* not needed at the moment: check_required = params->check_required; */
+   check_ambiguity = params->check_ambiguity;
+ 
+   if (initialize)
+Index: OpenOverlayRouter/oor/config/oor_config_confuse.c
+===================================================================
+--- OpenOverlayRouter.orig/oor/config/oor_config_confuse.c	2016-09-16 11:18:01.000000000 +0200
++++ OpenOverlayRouter/oor/config/oor_config_confuse.c	2017-01-31 14:54:10.470589694 +0100
+@@ -617,7 +617,7 @@
+ configure_ms(cfg_t *cfg)
+ {
+     char *iface_name;
+-    iface_t *iface;
++    iface_t *iface=NULL;
+     lisp_site_prefix_t *site;
+     shash_t *lcaf_ht;
+     int i;
+@@ -643,6 +643,9 @@
+         if (iface == NULL) {
+             return(BAD);
+         }
++    }else{
++	/* we have no iface_name, so also iface is missing */
++        return(BAD);
+     }
+ 
+     if (iface_address(iface, AF_INET) == NULL){
diff --git a/debian/patches/do-not-call.patch b/debian/patches/do-not-call.patch
new file mode 100644
index 0000000..4d744f7
--- /dev/null
+++ b/debian/patches/do-not-call.patch
@@ -0,0 +1,15 @@
+Author: Thorsten Alteholz <debian at alteholz.de>
+Description: don't use setcap during build
+Index: OpenOverlayRouter/oor/Makefile
+===================================================================
+--- OpenOverlayRouter.orig/oor/Makefile	2016-09-16 11:18:01.000000000 +0200
++++ OpenOverlayRouter/oor/Makefile	2017-01-26 12:55:49.252166981 +0100
+@@ -142,7 +142,7 @@
+ 
+ install: $(EXE)
+ 	mkdir -p $(DESTDIR)$(PREFIX) && cp $(EXE) $(DESTDIR)$(PREFIX)
+-	setcap cap_net_raw,cap_net_admin+ep $(DESTDIR)$(PREFIX)/$(EXE)
++	#XXX setcap cap_net_raw,cap_net_admin+ep $(DESTDIR)$(PREFIX)/$(EXE)
+ 
+ tags:
+ 	cscope -R -b
diff --git a/debian/patches/hardening.patch b/debian/patches/hardening.patch
new file mode 100644
index 0000000..d16ba70
--- /dev/null
+++ b/debian/patches/hardening.patch
@@ -0,0 +1,16 @@
+Author: Thorsten Alteholz <debian at alteholz.de>
+Description: add hardening flags
+Index: OpenOverlayRouter/oor/Makefile
+===================================================================
+--- OpenOverlayRouter.orig/oor/Makefile	2017-02-01 11:10:47.820616232 +0100
++++ OpenOverlayRouter/oor/Makefile	2017-02-01 11:11:12.489613983 +0100
+@@ -18,6 +18,9 @@
+ GENGETOPT   = gengetopt
+ ERROR       = false
+ 
++# add hardening flags
++LDFLAGS	   += -z now
++CFLAGS     += -D_FORTIFY_SOURCE=2
+ 
+ ifeq "$(platform)" ""
+ CFLAGS     += -Wall -std=gnu89 -g -I/usr/include/libxml2
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..7b2cad4
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1,5 @@
+do-not-call.patch
+change-prefix.patch
+spelling.patch
+compiler-warnings.patch
+hardening.patch
diff --git a/debian/patches/spelling.patch b/debian/patches/spelling.patch
new file mode 100644
index 0000000..5ddde9b
--- /dev/null
+++ b/debian/patches/spelling.patch
@@ -0,0 +1,198 @@
+Author: Thorsten Alteholz <debian at alteholz.de>
+Description: take care of Lintian spelling checks
+Index: OpenOverlayRouter/oor/config/oor_api_internals.c
+===================================================================
+--- OpenOverlayRouter.orig/oor/config/oor_api_internals.c	2017-01-27 11:32:34.836426542 +0100
++++ OpenOverlayRouter/oor/config/oor_api_internals.c	2017-01-27 11:32:34.828426219 +0100
+@@ -80,7 +80,7 @@
+     }else if (strcmp(str_afi,"lcaf") == 0){
+ 
+     }else{
+-        OOR_LOG(LDBG_2,"OOR_API->lxml_get_lisp_addr: Afi not suppoted: %s",str_afi);
++        OOR_LOG(LDBG_2,"OOR_API->lxml_get_lisp_addr: Afi not supported: %s",str_afi);
+         return NULL;
+     }
+ 
+@@ -121,7 +121,7 @@
+         shash_insert(lcaf_ht,strdup(name),laddr);
+         return (strdup(name));
+     }else{
+-        OOR_LOG(LDBG_2,"OOR_API->lxml_get_char_lisp_addr: Afi not suppoted: %s",str_afi);
++        OOR_LOG(LDBG_2,"OOR_API->lxml_get_char_lisp_addr: Afi not supported: %s",str_afi);
+         free(str_afi);
+         return (NULL);
+     }
+@@ -205,7 +205,7 @@
+             xml_elp_node = lxml_get_next_node(xml_elp_node);
+         }
+     }else {
+-        OOR_LOG(LDBG_2,"OOR_API->lxml_lcaf_get_lisp_addr: LCAF type not suppoted: %s",lcaf_type);
++        OOR_LOG(LDBG_2,"OOR_API->lxml_lcaf_get_lisp_addr: LCAF type not supported: %s",lcaf_type);
+         return (NULL);
+     }
+     free(lcaf_type);
+@@ -354,7 +354,7 @@
+         }
+         free(key_type_aux);
+         if (key_type != HMAC_SHA_1_96){
+-            OOR_LOG(LERR, "Configuraton file: Only SHA-1 (1) authentication is supported");
++            OOR_LOG(LERR, "Configuration file: Only SHA-1 (1) authentication is supported");
+             free(str_addr);
+             free(key);
+             return (BAD);
+Index: OpenOverlayRouter/oor/config/oor_config_functions.c
+===================================================================
+--- OpenOverlayRouter.orig/oor/config/oor_config_functions.c	2017-01-27 11:32:34.836426542 +0100
++++ OpenOverlayRouter/oor/config/oor_config_functions.c	2017-01-27 11:32:34.828426219 +0100
+@@ -296,13 +296,13 @@
+     glist_entry_t *it;
+ 
+     if (str_addr == NULL || key_type == 0 || key == NULL){
+-        OOR_LOG(LERR, "Configuraton file: Wrong Map Server configuration. "
++        OOR_LOG(LERR, "Configuration file: Wrong Map Server configuration. "
+                 "Check configuration file");
+         exit_cleanup();
+     }
+ 
+     if (key_type != HMAC_SHA_1_96){
+-        OOR_LOG(LERR, "Configuraton file: Only SHA-1 (1) authentication is supported");
++        OOR_LOG(LERR, "Configuration file: Only SHA-1 (1) authentication is supported");
+         exit_cleanup();
+     }
+ 
+@@ -912,7 +912,7 @@
+         }
+         if (locator != NULL){
+             glist_add(locator,loct_list);
+-            OOR_LOG(LDBG_2,"parse_rloc_address: Locator stucture created: \n %s",
++            OOR_LOG(LDBG_2,"parse_rloc_address: Locator structure created: \n %s",
+                     locator_to_char(locator));
+         }
+     }
+@@ -970,7 +970,7 @@
+     locator = locator_new_init(address, iface->status,1,1,conf_loc_iface->priority,
+             conf_loc_iface->weight,conf_loc_iface->mpriority, conf_loc_iface->mweight);
+ 
+-    OOR_LOG(LDBG_2,"parse_rloc_address: Locator stucture created: \n %s",
++    OOR_LOG(LDBG_2,"parse_rloc_address: Locator structure created: \n %s",
+                         locator_to_char(locator));
+ 
+     /* If the locator is for a local mapping, associate the locator with the interface */
+Index: OpenOverlayRouter/oor/oor.ggo
+===================================================================
+--- OpenOverlayRouter.orig/oor/oor.ggo	2017-01-27 11:32:34.836426542 +0100
++++ OpenOverlayRouter/oor/oor.ggo	2017-01-27 11:32:34.828426219 +0100
+@@ -23,7 +23,7 @@
+ 
+ defmode "oorconfig"
+ 
+-modeoption "debug" d "Debuging output [0..3]"
++modeoption "debug" d "Debugging output [0..3]"
+ 	int values="0","1","2","3" enum mode="oorconfig" optional
+ 
+ modeoption "afi" a "Default RLOCs afi [4,6]"
+Index: OpenOverlayRouter/oor/control/lisp_xtr.c
+===================================================================
+--- OpenOverlayRouter.orig/oor/control/lisp_xtr.c	2017-01-27 11:32:34.836426542 +0100
++++ OpenOverlayRouter/oor/control/lisp_xtr.c	2017-01-27 11:32:34.828426219 +0100
+@@ -1675,7 +1675,7 @@
+             if (mce == NULL){
+                 /* It is a PeTR RLOC */
+                 if ( mcache_entry_mapping(xtr->petrs) != map ){
+-                    OOR_LOG(LERR,"rloc_probing: No map cache entry for EID %s. It should never happend",
++                    OOR_LOG(LERR,"rloc_probing: No map cache entry for EID %s. It should never happened",
+                             lisp_addr_to_char(mapping_eid(map)));
+                     return (BAD);
+                 }
+@@ -2650,7 +2650,7 @@
+             break;
+         case ACT_SEND_MREQ:
+             // TODO: To be implemented. Now drop paquet
+-            OOR_LOG(LDBG_2, "Recived a packet of an entry with ACT send map req. Drop packet");
++            OOR_LOG(LDBG_2, "Received a packet of an entry with ACT send map req. Drop packet");
+             lisp_addr_del(src_eid);
+             lisp_addr_del(dst_eid);
+             fwd_info->neg_map_reply_act = ACT_NO_ACTION;
+Index: OpenOverlayRouter/oor/control/oor_control.c
+===================================================================
+--- OpenOverlayRouter.orig/oor/control/oor_control.c	2017-01-27 11:32:34.836426542 +0100
++++ OpenOverlayRouter/oor/control/oor_control.c	2017-01-27 11:32:34.828426219 +0100
+@@ -95,7 +95,7 @@
+     }
+ 
+     free(ctrl);
+-    OOR_LOG(LDBG_1,"Lisp controler destroyed");
++    OOR_LOG(LDBG_1,"Lisp controller destroyed");
+ }
+ 
+ void
+@@ -189,7 +189,7 @@
+ /*
+  * Return the default control rlocs in a list that shoud be released
+  * by the user.
+- * @param ctrl Lisp controler to be used
++ * @param ctrl Lisp controller to be used
+  * @return glist_t * with the lisp_addr_t * of the default rlocs
+  */
+ glist_t *
+Index: OpenOverlayRouter/oor/iface_mgmt.c
+===================================================================
+--- OpenOverlayRouter.orig/oor/iface_mgmt.c	2017-01-27 11:32:34.836426542 +0100
++++ OpenOverlayRouter/oor/iface_mgmt.c	2017-01-27 11:32:34.828426219 +0100
+@@ -354,7 +354,7 @@
+ 
+     if ( rtm->rtm_family != AF_INET && rtm->rtm_family != AF_INET6 ) {
+         OOR_LOG(LDBG_3,"process_nl_new_unicast_route: New unicast route of "
+-                "unknown adddress family %d", rtm->rtm_family);
++                "unknown address family %d", rtm->rtm_family);
+         return;
+     }
+ 
+@@ -577,7 +577,7 @@
+ 
+     if ( rtm->rtm_family != AF_INET && rtm->rtm_family != AF_INET6 ) {
+         OOR_LOG(LDBG_3,"process_nl_del_unicast_route: New unicast route of "
+-                "unknown adddress family %d", rtm->rtm_family);
++                "unknown address family %d", rtm->rtm_family);
+         return;
+     }
+ 
+Index: OpenOverlayRouter/oor/lib/packets.c
+===================================================================
+--- OpenOverlayRouter.orig/oor/lib/packets.c	2017-01-27 11:32:34.836426542 +0100
++++ OpenOverlayRouter/oor/lib/packets.c	2017-01-27 11:32:34.828426219 +0100
+@@ -479,7 +479,7 @@
+         break;
+     default:
+         OOR_LOG(LDBG_2,
+-                "build_ip_header: Uknown AFI of the source address: %d",
++                "build_ip_header: Unknown AFI of the source address: %d",
+                 lisp_addr_ip_afi(src_addr));
+         return (NULL);
+     }
+Index: OpenOverlayRouter/oor/liblisp/lisp_address.c
+===================================================================
+--- OpenOverlayRouter.orig/oor/liblisp/lisp_address.c	2017-01-27 11:32:34.836426542 +0100
++++ OpenOverlayRouter/oor/liblisp/lisp_address.c	2017-01-27 11:32:34.828426219 +0100
+@@ -476,7 +476,7 @@
+         memset(offset, 0, sizeof(uint16_t));
+         return (sizeof(uint16_t));
+     default:
+-        OOR_LOG(LDBG_3, "lisp_addr_write_to_pkt: Unkown afi %d",
++        OOR_LOG(LDBG_3, "lisp_addr_write_to_pkt: Unknown afi %d",
+                 lisp_addr_lafi(laddr));
+         break;
+     }
+Index: OpenOverlayRouter/oor/data-plane/tun/tun_output.c
+===================================================================
+--- OpenOverlayRouter.orig/oor/data-plane/tun/tun_output.c	2016-09-16 11:18:01.000000000 +0200
++++ OpenOverlayRouter/oor/data-plane/tun/tun_output.c	2017-01-27 11:33:05.813676404 +0100
+@@ -212,7 +212,7 @@
+         case ACT_NO_ACTION:
+         case ACT_SEND_MREQ:
+         case ACT_DROP:
+-            OOR_LOG(LDBG_3, "tun_output_unicast: Packet droped");
++            OOR_LOG(LDBG_3, "tun_output_unicast: Packet dropped");
+             return (GOOD);
+         case ACT_NATIVE_FWD:
+             return(tun_forward_native(b, &tuple->dst_addr));
diff --git a/debian/rules b/debian/rules
new file mode 100755
index 0000000..1507fea
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,13 @@
+#!/usr/bin/make -f
+
+export DH_VERBOSE=1
+
+%:
+	dh $@
+
+#override_dh_auto_build:
+#	echo "Build version: >$(MAJOR).$(MINOR).$(REV)<"
+#	RELDFLAGS)" CPPFLAGS="$(CPPFLAGS) $(MORECPPFLAGS)" VERSION_MAJ=$(MAJOR) VERSION_MIN=$(MINOR) VERSION_REV=$(REV) PREFIX=/usr SYSCONFDIR=/etc/openzwave instlibdir=$(LIBDIR) make
+#
+#get-orig-source:
+#	uscan --force-download --debug --repack
diff --git a/debian/source/format b/debian/source/format
new file mode 100644
index 0000000..163aaf8
--- /dev/null
+++ b/debian/source/format
@@ -0,0 +1 @@
+3.0 (quilt)
diff --git a/debian/watch b/debian/watch
new file mode 100644
index 0000000..c7a6a57
--- /dev/null
+++ b/debian/watch
@@ -0,0 +1,5 @@
+version=3
+opts=repacksuffix=+ds1,\
+dversionmangle=s/\+(debian|dfsg|ds|deb)(\.?\d+)?$//,\
+filenamemangle=s/.+\/v?(\d\S+)\.tar\.gz/openoverlayrouter-$1\.tar\.gz/ \
+https://github.com/OpenOverlayRouter/oor/tags .*/v?(\d\S+)\.tar\.gz

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-iot/oor.git



More information about the Debian-iot-packaging mailing list