Compare commits

...

91 Commits

Author SHA1 Message Date
Sukru Senli
ed107abe0e questd updated 2017-01-30 17:57:42 +01:00
Sukru Senli
7968558847 questd-updated 2017-01-27 11:29:44 +01:00
Alex Oprea
692fced9f9 questd: questd-monitor: remove dummy set 2017-01-25 19:21:16 +01:00
Alex Oprea
7f467c553a questd: add quest-monitor script refs #11253 2017-01-25 19:16:28 +01:00
Sukru Senli
c6383f1d0d asterisk: create hotplug directory 2017-01-25 17:51:23 +01:00
Sukru Senli
db87f6c673 asterisk: do not stop boot process #11083 2017-01-25 17:51:20 +01:00
Sukru Senli
32a6438946 brcmwifi: policy based band steering 2017-01-25 17:51:16 +01:00
Sukru Senli
ebbe738a6b icwmp-3.0-2017-01-20 2017-01-25 17:51:08 +01:00
Sukru Senli
dddf21c8ea inteno-netmodes: repeater modes bridge all ports 2017-01-18 20:29:18 +01:00
Alex Oprea
351cbf5689 multiwan: allow comma as separator in dns servers list 2017-01-18 16:43:51 +01:00
Alex Oprea
1a520f8012 multiwan: use dns entries from alias interfaces refs #11167 2017-01-18 14:41:27 +01:00
Sukru Senli
6d946f825d icwmp-3.0-2017-01-17 2017-01-17 16:43:32 +01:00
Alex Oprea
b99bfac5d7 multiwan: allow overlapping interface names refs #11167
Overlapping interface names: wan and wwan

fixed wan_id_map

wan_if_map

all the query_config

wan_ip_map and wan_gw_map

wan_fail_map

wan_recorevery_map

wan_monitor_map

fix closing parantheses
2017-01-13 15:56:43 +01:00
Reidar Cederqvist
c22ff6da15 multiwan-script: added some network_flush_cache to get fresh data 2017-01-13 10:53:53 +01:00
Reidar Cederqvist
ecaae37784 Update feed [ feed_inteno_packages ] package [ questd ]
-------------------------------------------------------------------------------
* 44105d2 directory.c: removed unwanted printouts and moved the level-check
-------------------------------------------------------------------------------
commit 44105d2003ad530b8ba4e85fd6ac06850aec1f4c
Author: Reidar Cederqvist <reidar.cederqvist@gmail.com>
Date: 2017-01-11 13:48:13 +0100

    directory.c: removed unwanted printouts and moved the level-check

Base directory -> /
 directory.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
-------------------------------------------------------------------------------
2017-01-11 13:48:37 +01:00
Reidar Cederqvist
2b52dbf70c Update feed [ feed_inteno_packages ] package [ questd ]
-------------------------------------------------------------------------------
* c90a65c directory.c: added a max_recursion_level to folder_tree
* efe54ef mtk: do not create dsl object
* 4486659 directory.c: fixed memory-leak and made some improvments
-------------------------------------------------------------------------------
commit c90a65c91092b50bd5166b655db0c52466f760c9
Author: Reidar Cederqvist <reidar.cederqvist@gmail.com>
Date: 2017-01-11 13:42:46 +0100

    directory.c: added a max_recursion_level to folder_tree

Base directory -> /
 directory.c | 14 ++++++++++----
 directory.h |  2 +-
 2 files changed, 11 insertions(+), 5 deletions(-)
-------------------------------------------------------------------------------
commit efe54ef99677c9a5e0c7c3b10f04defa0944f5de
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2017-01-11 13:31:41 +0100

    mtk: do not create dsl object

Base directory -> /
 questd.c | 2 +-
 questd.h | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)
-------------------------------------------------------------------------------
commit 4486659c73b25c8e4c5fcd466023bb85634a6dc9
Author: Reidar Cederqvist <reidar.cederqvist@gmail.com>
Date: 2017-01-11 12:42:26 +0100

    directory.c: fixed memory-leak and made some improvments

Base directory -> /
 directory.c | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)
-------------------------------------------------------------------------------
2017-01-11 13:43:43 +01:00
Reidar Cederqvist
5c83411d48 Update feed [ feed_inteno_packages ] package [ questd ]
-------------------------------------------------------------------------------
* a680f2f directory.c: fixed so that autocompltete returns path + directory name
-------------------------------------------------------------------------------
commit a680f2f190bc0b93d646d5a5804367a3155e7b4f
Author: Reidar Cederqvist <reidar.cederqvist@gmail.com>
Date: 2017-01-11 11:08:28 +0100

    directory.c: fixed so that autocompltete returns path + directory name

Base directory -> /
 directory.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
-------------------------------------------------------------------------------
2017-01-11 11:09:05 +01:00
Reidar Cederqvist
3fa43ebf40 Update feed [ feed_inteno_packages ] package [ questd ]
-------------------------------------------------------------------------------
* a638d7b chaged autocomplete to return an array insted of object
-------------------------------------------------------------------------------
commit a638d7bf300c961fe7477349bf3fe37efb16d125
Author: Reidar Cederqvist <reidar.cederqvist@gmail.com>
Date: 2017-01-11 10:44:10 +0100

    chaged autocomplete to return an array insted of object

Base directory -> /
 directory.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
-------------------------------------------------------------------------------
2017-01-11 10:44:33 +01:00
Reidar Cederqvist
b7a2269497 updated questd to latest devel and fixed spelling error 2017-01-11 10:32:58 +01:00
Reidar Cederqvist
d4a22863e0 Update feed [ feed_inteno_packages ] package [ questd ]
-------------------------------------------------------------------------------
*   29d32f0 Merge branch 'test' into devel
|\
| * b2ed2ff directory: added a autocomplete function to router.directory
| * ca50004 directory: updated router.directory folder_tree
| * 26cf2e9 added a directory object with folder_tree function
* e6b84b5 manually applied the changes that were skipped during rebase
* 5214820 wificontrol: do ifup wan for Broadcom only
* efc2024 trim some strings to remove the newline
* 5bf0675 broadcom: retrieve the encryption, key management and cipher for the scanned networks
* 1fd3c3a Read mediatek values from db
* 34e8d3d rename scanresult to scanresults
* 994cb4c broadcom: fix scaning results for 5 GHz
* 7a2d9fc fixed some warnings
* 0407d44 fix eswap defines parantheses
* 22f2cfc changed the naming in output from scanresults for mediatek
* 976bfe6 commented out unused functions
* 6e39519 broadcom: wireless scanning, first version
* 23f9fe1 move the blob_buf_init function
* cc312f6 broadcom: add wl_scan
* 062a1aa add header files include guards
* 6d6869b added ubus call router.wireless scan and scanresult functions
* a3f559a wl_get_noise: try to use ioctl, but this is not yet implemented in the kernel
* 1857794 wl_get_isup: use ioctl call
* 8ff33b8 fixed so that sizeof is used with correct array
* 34e3a9b fixes to be able to build on broadcom after merge
* cab79a2 check for pointer for not being null
* bac5591 added a comment for why hwmodes is const char
* 8042fae fixed some warnings and made Wireless and Radio struct have static memory
* 830fbd5 wl_get_bitrate: use ioctl call to get the bitrate
* c4bd374 use correct socket fd
* 1487eb8 wl_get_bssid: use ioctl call
* ba7760f fixed a argument-order misstake
* a098935 close the rectory after usage
* 50c0462 wl_get_ssid: use ioctl call to get the essid
* d3b69bc made it so that wl_ioctl is ucing the last input as length
* da523ef fixed some warnings in network.c and mediatek.c
* 43bf140 cleaned out the loead_network function
* 62ecff1 finilized the ubus call router.port status function
* 7e3a399 added a free for the uci_network and uci_dhcp objects
* c5b4341 added a function to free the memory allocated by init_package
* c8cb634 exposed a framework to get hw values from tools.h
* 018e6f3 changed from including sys/time.h to time.h
* 2c6e99b ioctl for getting the frequency channel
* 7d91ab4 wl_ioctl: do not use strlen on uninitialized memory. replaced with sizeof
* 6599c09 wl_ioctl: prevent interface name buffer overflow
* 25de286 Revert "removed unused code (fdb)"
* 2e8f041 changed the include for time.h from sys/time.h to time.h
* c68430e removed unused modules from makefile
* 39ea427 moved init_package to tools
* ae59581 changed the include for time.h from sys/ to just time.h
* e530a33 removed unused code (fdb)
* 11ebaa8 mini fix to makeifle
* 111e227 moved questd_cflags to questd_target
* b70fe5d test to add swconfig
* b87d8fe include swlib
* c650df2 started work on ubus call router.ports info
* 16d9b8b started work on ubus call router.ports info
* f25a767 call hotplug script for wps client pbc
* 742d375 initial mtk wps support
* 0d6c9e5 remove unterminated define
* 05931f2 mtk: zero tx and rx bytes until we get them correctly
* b6c070d put endif to correct line
* c2d1d1f mtk: cleanup
* 60f8a4f mtk: show speed correctly
* 29f1216 mtk: fix some warnings
* 281582d mtk: get rssi value correctly
* bd198fb mtk: get wireless clients from assoclist
* c176fbe mtk: more cleanup
* 7295555 mtk: header file cleanup
* 240ae2d mtk: ioctl working
* a0f8a62 mediatek code cleanup
* 77c431e use same get port name method for brcm and mtk
* 4ad37fb for mtk read encryption from config for now
* dd9a00d show real speed for mtk
* aa72845 zero device char array first
* 3d6140a calculate wdev correctly for mtk
* 8ff56ee mediatek updates
* 148584b mediatek: hardcode sta info until we know how to get it
* 74023cc mediatek: network topology almost working
* c843235 imitate led.internet object
* e3748e8 initial mediatek wireless code
* 06a2d5c mediatek
-------------------------------------------------------------------------------
commit 29d32f0b5564b89efb2c067f0b9627e9da324451
Author: Reidar Cederqvist <reidar.cederqvist@gmail.com>
Date: 2017-01-11 10:13:33 +0100

    Merge branch 'test' into devel

Base directory -> /
 Makefile    |   4 +-
 directory.c | 205 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 directory.h |   3 +
 questd.c    |   2 +
 questd.h    |   2 +
 5 files changed, 214 insertions(+), 2 deletions(-)
-------------------------------------------------------------------------------
commit b2ed2ffc5a9c1056a4aed8e76080ee795e0f809e
Author: Reidar Cederqvist <reidar.cederqvist@gmail.com>
Date: 2017-01-11 10:07:16 +0100

    directory: added a autocomplete function to router.directory

Base directory -> /
 directory.c | 62 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 directory.h |  1 +
 2 files changed, 63 insertions(+)
-------------------------------------------------------------------------------
commit ca50004d11214a2bbd3c6f5ef4df1e3e047c5f1f
Author: Reidar Cederqvist <reidar.cederqvist@gmail.com>
Date: 2017-01-11 10:06:51 +0100

    directory: updated router.directory folder_tree

Base directory -> /
 directory.c | 38 +++++++++++++++++---------------------
 directory.h |  1 +
 2 files changed, 18 insertions(+), 21 deletions(-)
-------------------------------------------------------------------------------
commit e6b84b5f17fb44fc33adc4eb40123fdec2322065
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2017-01-10 18:59:47 +0100

    manually applied the changes that were skipped during rebase

Base directory -> /
 mediatek.c | 46 +++++++++++++++++++++++++++++++++++++++-------
 network.c  |  1 -
 system.c   |  4 ++--
 tools.c    | 25 +++++++++++++++++++++++++
 tools.h    |  1 +
 wireless.c | 18 ++++++------------
 wps.c      |  2 +-
 7 files changed, 74 insertions(+), 23 deletions(-)
-------------------------------------------------------------------------------
commit 52148208c920ecf966171cef1e976543bf647bfd
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2017-01-10 15:59:53 +0100

    wificontrol: do ifup wan for Broadcom only

Base directory -> /
 wificontrol.c | 2 ++
 1 file changed, 2 insertions(+)
-------------------------------------------------------------------------------
commit efc20244b17cc49fa1260d3c210e78db1d4750c6
Author: Alex Oprea <alex.oprea@inteno.se>
Date: 2016-12-22 19:27:02 +0100

    trim some strings to remove the newline

Base directory -> /
 network.c | 4 ++--
 system.c  | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)
-------------------------------------------------------------------------------
commit 5bf0675efe3011c90c4b6bae048ed6e613b47f2a
Author: Alex Oprea <alex.oprea@inteno.se>
Date: 2016-12-21 18:58:51 +0100

    broadcom: retrieve the encryption, key management and cipher for the scanned
    networks

Base directory -> /
 broadcom.c | 183 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 183 insertions(+)
-------------------------------------------------------------------------------
commit 1fd3c3a2a8ad728c17ece1d383b01d9cade2fa1f
Author: Jonas Höglund <jonas.hoglund@embeddednation.com>
Date: 2016-12-22 14:57:39 +0100

    Read mediatek values from db

Base directory -> /
 dumper.c | 17 ++---------------
 1 file changed, 2 insertions(+), 15 deletions(-)
-------------------------------------------------------------------------------
commit 34e8d3d408809408306b7823b374f978cddd6f9e
Author: Alex Oprea <alex.oprea@inteno.se>
Date: 2016-12-21 16:59:47 +0100

    rename scanresult to scanresults

Base directory -> /
 wireless.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
-------------------------------------------------------------------------------
commit 994cb4c081395254a102ccb6f361ca6c4527da8f
Author: Alex Oprea <alex.oprea@inteno.se>
Date: 2016-12-21 16:54:31 +0100

    broadcom: fix scaning results for 5 GHz

Base directory -> /
 broadcom.c | 40 +++++++++++++++++++++++-----------------
 1 file changed, 23 insertions(+), 17 deletions(-)
-------------------------------------------------------------------------------
commit 7a2d9fc1860111d997ffbf50a4ef4d3f0f2c3468
Author: Reidar Cederqvist <reidar.cederqvist@gmail.com>
Date: 2016-12-21 11:41:45 +0100

    fixed some warnings

Base directory -> /
 broadcom.c | 4 +++-
 broadcom.h | 2 +-
 port.c     | 3 +--
 wireless.c | 1 +
 4 files changed, 6 insertions(+), 4 deletions(-)
-------------------------------------------------------------------------------
commit 0407d44269c6d4105a7601872906bc3b95963f09
Author: Alex Oprea <alex.oprea@inteno.se>
Date: 2016-12-21 16:39:15 +0100

    fix eswap defines parantheses

Base directory -> /
 broadcom.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
-------------------------------------------------------------------------------
commit 22f2cfc5f4aa31e85552f8f2f69e8192849fd450
Author: Reidar Cederqvist <reidar.cederqvist@gmail.com>
Date: 2016-12-20 10:21:28 +0100

    changed the naming in output from scanresults for mediatek

Base directory -> /
 mediatek.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
-------------------------------------------------------------------------------
commit 976bfe60f787fc73322b56e1d6243c284ffbf65d
Author: Reidar Cederqvist <reidar.cederqvist@gmail.com>
Date: 2016-12-20 10:20:45 +0100

    commented out unused functions

Base directory -> /
 broadcom.c | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)
-------------------------------------------------------------------------------
commit 6e39519bcda662bc7b45bd871d028c65544b5e66
Author: Alex Oprea <alex.oprea@inteno.se>
Date: 2016-12-19 19:38:06 +0100

    broadcom: wireless scanning, first version

Base directory -> /
 broadcom.c | 79 +++++++++++++++++++++++++++++++++++++++++++-------------------
 broadcom.h |  9 +++++++
 2 files changed, 64 insertions(+), 24 deletions(-)
-------------------------------------------------------------------------------
commit 23f9fe1c349ff6dc4934998f89c7e7636b15fc5d
Author: Alex Oprea <alex.oprea@inteno.se>
Date: 2016-12-19 19:37:15 +0100

    move the blob_buf_init function

Base directory -> /
 mediatek.c | 1 -
 wireless.c | 1 +
 2 files changed, 1 insertion(+), 1 deletion(-)
-------------------------------------------------------------------------------
commit cc312f6b27312c9c29d831aa45392f939e0752ee
Author: Alex Oprea <alex.oprea@inteno.se>
Date: 2016-12-16 16:06:23 +0100

    broadcom: add wl_scan

Base directory -> /
 broadcom.c | 33 +++++++++++++++++++++++++++++++++
 broadcom.h | 48 ++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 81 insertions(+)
-------------------------------------------------------------------------------
commit 062a1aaa7c161fb43c4b3227186c541fea23938c
Author: Alex Oprea <alex.oprea@inteno.se>
Date: 2016-12-16 16:05:35 +0100

    add header files include guards

Base directory -> /
 broadcom.h | 5 +++++
 mediatek.h | 4 ++++
 2 files changed, 9 insertions(+)
-------------------------------------------------------------------------------
commit 6d6869bb71516514412d5c4fa054e6f6ed82f9f5
Author: Reidar Cederqvist <reidar.cederqvist@gmail.com>
Date: 2016-12-16 15:19:12 +0100

    added ubus call router.wireless scan and scanresult functions

Base directory -> /
 mediatek.c | 39 ++++++++++++++++++++++++++++
 mediatek.h |  4 +++
 wireless.c | 86 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 129 insertions(+)
-------------------------------------------------------------------------------
commit a3f559a27359ecedaf73a53237a3eb52198054f6
Author: Alex Oprea <alex.oprea@inteno.se>
Date: 2016-12-16 14:54:26 +0100

    wl_get_noise: try to use ioctl, but this is not yet implemented in the
    kernel

Base directory -> /
 mediatek.c | 40 +++++++++++++++++++++++++++++++++++-----
 1 file changed, 35 insertions(+), 5 deletions(-)
-------------------------------------------------------------------------------
commit 1857794e1051178ef57dae03e8e9adab8828e445
Author: Alex Oprea <alex.oprea@inteno.se>
Date: 2016-12-15 16:54:03 +0100

    wl_get_isup: use ioctl call

Base directory -> /
 mediatek.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
-------------------------------------------------------------------------------
commit 8ff33b8496e50a739516e10c1d988e1d7fe55908
Author: Reidar Cederqvist <reidar.cederqvist@gmail.com>
Date: 2016-11-04 12:17:36 +0100

    fixed so that sizeof is used with correct array

Base directory -> /
 network.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
-------------------------------------------------------------------------------
commit 34e3a9b2374295608d89798319bc8367eb86990a
Author: Alex Oprea <alex.oprea@inteno.se>
Date: 2016-12-15 14:41:01 +0100

    fixes to be able to build on broadcom after merge

Base directory -> /
 port.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
-------------------------------------------------------------------------------
commit cab79a2c7ddc519f9a84b2be9c225a6d32d5b095
Author: Alex Oprea <alex.oprea@inteno.se>
Date: 2016-12-15 11:56:10 +0100

    check for pointer for not being null

Base directory -> /
 wireless.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
-------------------------------------------------------------------------------
commit bac55917b397eb714c12f0d3637fd84c8a19e7d8
Author: Reidar Cederqvist <reidar.cederqvist@gmail.com>
Date: 2016-12-15 09:54:08 +0100

    added a comment for why hwmodes is const char

Base directory -> /
 wireless.h | 1 +
 1 file changed, 1 insertion(+)
-------------------------------------------------------------------------------
commit 8042faec11123b6ef9a4ccb640d632f081030e1a
Author: Reidar Cederqvist <reidar.cederqvist@gmail.com>
Date: 2016-12-15 09:43:14 +0100

    fixed some warnings and made Wireless and Radio struct have static memory

Base directory -> /
 network.c  |  2 --
 wireless.c | 35 +++++++++++++++--------------------
 wireless.h | 16 ++++++++++------
 3 files changed, 25 insertions(+), 28 deletions(-)
-------------------------------------------------------------------------------
commit 830fbd535934a5c53176765b6577d6eb593b3db1
Author: Alex Oprea <alex.oprea@inteno.se>
Date: 2016-12-14 18:26:45 +0100

    wl_get_bitrate: use ioctl call to get the bitrate

Base directory -> /
 mediatek.c | 14 +++++++++-----
 mediatek.h |  2 +-
 wireless.c | 13 +++++++------
 3 files changed, 17 insertions(+), 12 deletions(-)
-------------------------------------------------------------------------------
commit c4bd374075dd1a7720f2e30ec48cd79a4f2b1103
Author: Alex Oprea <alex.oprea@inteno.se>
Date: 2016-12-14 16:36:09 +0100

    use correct socket fd

Base directory -> /
 mediatek.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
-------------------------------------------------------------------------------
commit 1487eb83e09a23a28fd351215fc4fdf405e6c0e7
Author: Alex Oprea <alex.oprea@inteno.se>
Date: 2016-12-14 15:34:00 +0100

    wl_get_bssid: use ioctl call

Base directory -> /
 mediatek.c | 25 +++++++++++++++++++++----
 1 file changed, 21 insertions(+), 4 deletions(-)
-------------------------------------------------------------------------------
commit ba7760f8f69fb55c5448af5946a10f91f1b9f343
Author: Reidar Cederqvist <reidar.cederqvist@gmail.com>
Date: 2016-12-14 14:40:26 +0100

    fixed a argument-order misstake

Base directory -> /
 port.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
-------------------------------------------------------------------------------
commit a098935814dd16fae6c8638d371d4a0b05354e3a
Author: Alex Oprea <alex.oprea@inteno.se>
Date: 2016-12-14 14:01:54 +0100

    close the rectory after usage

Base directory -> /
 port.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
-------------------------------------------------------------------------------
commit 50c0462ab3a98abf847ecb27633aebba9ad8b99a
Author: Alex Oprea <alex.oprea@inteno.se>
Date: 2016-12-14 13:08:47 +0100

    wl_get_ssid: use ioctl call to get the essid

Base directory -> /
 mediatek.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
-------------------------------------------------------------------------------
commit d3b69bc82c1ab7811709d7f7b06a11546ad398fc
Author: Reidar Cederqvist <reidar.cederqvist@gmail.com>
Date: 2016-12-14 12:02:36 +0100

    made it so that wl_ioctl is ucing the last input as length

    WARNING: make sure that you send in a valid length wen calling this function

Base directory -> /
 mediatek.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
-------------------------------------------------------------------------------
commit da523efc07bcc636e647505c64dd76ede26cd032
Author: Reidar Cederqvist <reidar.cederqvist@gmail.com>
Date: 2016-12-14 11:50:54 +0100

    fixed some warnings in network.c and mediatek.c

Base directory -> /
 mediatek.c | 4 +---
 network.c  | 6 ++----
 2 files changed, 3 insertions(+), 7 deletions(-)
-------------------------------------------------------------------------------
commit 43bf1409620e8ceb5a66f7333523b479c3ef80c1
Author: Reidar Cederqvist <reidar.cederqvist@gmail.com>
Date: 2016-12-14 10:10:38 +0100

    cleaned out the loead_network function

Base directory -> /
 network.c | 60 ++++++++++++++++++++++++++++++------------------------------
 1 file changed, 30 insertions(+), 30 deletions(-)
-------------------------------------------------------------------------------
commit 62ecff193ee102ba6a2670a100777e2b321df13f
Author: Reidar Cederqvist <reidar.cederqvist@gmail.com>
Date: 2016-12-13 17:31:48 +0100

    finilized the ubus call router.port status function

Base directory -> /
 port.c | 160 ++++++++++++++++++++++++++++++++++++++++++++++++-----------------
 1 file changed, 119 insertions(+), 41 deletions(-)
-------------------------------------------------------------------------------
commit 7e3a399dcf80c79080ab1bc429a0d541b0d02b4e
Author: Reidar Cederqvist <reidar.cederqvist@gmail.com>
Date: 2016-12-13 17:31:17 +0100

    added a free for the uci_network and uci_dhcp objects

Base directory -> /
 network.c | 12 +++++++-----
 network.h | 10 +++++-----
 2 files changed, 12 insertions(+), 10 deletions(-)
-------------------------------------------------------------------------------
commit c5b434130ecfa3e707f0fb5881df27ca68b1fb53
Author: Reidar Cederqvist <reidar.cederqvist@gmail.com>
Date: 2016-12-13 17:30:04 +0100

    added a function to free the memory allocated by init_package

Base directory -> /
 tools.h | 1 +
 1 file changed, 1 insertion(+)
-------------------------------------------------------------------------------
commit c8cb6348762bb1508ad549cb134547fcad2a29cf
Author: Reidar Cederqvist <reidar.cederqvist@gmail.com>
Date: 2016-12-13 17:28:29 +0100

    exposed a framework to get hw values from tools.h

Base directory -> /
 dumper.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
-------------------------------------------------------------------------------
commit 018e6f30c1a0b1ed38f28ab07f6a9434da93eb28
Author: Reidar Cederqvist <reidar.cederqvist@gmail.com>
Date: 2016-12-13 17:26:02 +0100

    changed from including sys/time.h to time.h

Base directory -> /
 dumper.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
-------------------------------------------------------------------------------
commit 2c6e99b0a0167abfdd620aa85103a31284ddd7fe
Author: Alex Oprea <alex.oprea@inteno.se>
Date: 2016-12-13 16:27:03 +0100

    ioctl for getting the frequency channel

Base directory -> /
 mediatek.c | 23 ++++++++++++++---------
 1 file changed, 14 insertions(+), 9 deletions(-)
-------------------------------------------------------------------------------
commit 7d91ab4fa5cedfafb993d8a40ec73eecb5ff8502
Author: Alex Oprea <alex.oprea@inteno.se>
Date: 2016-12-12 19:54:36 +0100

    wl_ioctl: do not use strlen on uninitialized memory. replaced with sizeof

Base directory -> /
 mediatek.c | 1 +
 1 file changed, 1 insertion(+)
-------------------------------------------------------------------------------
commit 6599c0927f205365ac99b993890f9296c24eb2e9
Author: Alex Oprea <alex.oprea@inteno.se>
Date: 2016-12-12 19:36:40 +0100

    wl_ioctl: prevent interface name buffer overflow

Base directory -> /
 mediatek.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
-------------------------------------------------------------------------------
commit 25de2863aebda6a48ca3ad03e25ddcd7a89f1892
Author: Reidar Cederqvist <reidar.cederqvist@gmail.com>
Date: 2016-12-12 14:28:27 +0100

    Revert "removed unused code (fdb)"

    This reverts commit eee8ee1b2c72cc9b2cd126a710ba06c4f1ca927b.

Base directory -> /
 port.c | 20 ++++++++++++++------
 1 file changed, 14 insertions(+), 6 deletions(-)
-------------------------------------------------------------------------------
commit 2e8f041f1ecf0d34309f0f59aeb2a81584183aa9
Author: Reidar Cederqvist <reidar.cederqvist@gmail.com>
Date: 2016-12-12 13:10:14 +0100

    changed the include for time.h from sys/time.h to time.h

Base directory -> /
 dumper.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
-------------------------------------------------------------------------------
commit c68430ef338fac895afdb17bace0bdc662477351
Author: Reidar Cederqvist <reidar.cederqvist@gmail.com>
Date: 2016-12-12 13:09:38 +0100

    removed unused modules from makefile

Base directory -> /
 Makefile | 12 ------------
 1 file changed, 12 deletions(-)
-------------------------------------------------------------------------------
commit 39ea427c985c2bcebb51969ae22abc06371b6313
Author: Reidar Cederqvist <reidar.cederqvist@gmail.com>
Date: 2016-12-12 12:53:20 +0100

    moved init_package to tools

Base directory -> /
 Makefile   |  2 +-
 network.c  | 27 +++------------------------
 tools.h    |  2 ++
 wireless.c | 23 +----------------------
 4 files changed, 7 insertions(+), 47 deletions(-)
-------------------------------------------------------------------------------
commit ae5958187189423be02cc381eefd37e919aacc86
Author: Reidar Cederqvist <reidar.cederqvist@gmail.com>
Date: 2016-12-12 12:34:08 +0100

    changed the include for time.h from sys/ to just time.h

Base directory -> /
 dumper.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
-------------------------------------------------------------------------------
commit e530a3322232b1badbe9ce479f54bc9700335a96
Author: Reidar Cederqvist <reidar.cederqvist@gmail.com>
Date: 2016-12-12 12:14:44 +0100

    removed unused code (fdb)

Base directory -> /
 port.c | 20 ++++++--------------
 1 file changed, 6 insertions(+), 14 deletions(-)
-------------------------------------------------------------------------------
commit 11ebaa8ee733fd6df63150f5e877b8a564c44d05
Author: Reidar Cederqvist <reidar.cederqvist@gmail.com>
Date: 2016-12-09 16:39:13 +0100

    mini fix to makeifle

Base directory -> /
 Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
-------------------------------------------------------------------------------
commit 111e227d5b385cf5fcedd9cbb9f2b6c6f4326297
Author: Reidar Cederqvist <reidar.cederqvist@gmail.com>
Date: 2016-12-09 15:55:08 +0100

    moved questd_cflags to questd_target

Base directory -> /
 Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
-------------------------------------------------------------------------------
commit b70fe5d3939e383b5a5195ce2733945417ba79a9
Author: Reidar Cederqvist <reidar.cederqvist@gmail.com>
Date: 2016-12-09 15:53:33 +0100

    test to add swconfig

Base directory -> /
 Makefile   |  7 ++++---
 mediatek.c |  2 +-
 port.c     | 54 ++++++++++++++++++++++++++++++++++++++++++++----------
 3 files changed, 49 insertions(+), 14 deletions(-)
-------------------------------------------------------------------------------
commit b87d8fe2c715e07cd203299567d244b426ce0d23
Author: Reidar Cederqvist <reidar.cederqvist@gmail.com>
Date: 2016-12-09 09:55:10 +0100

    include swlib

Base directory -> /
 Makefile | 4 +++-
 port.c   | 6 ++++++
 2 files changed, 9 insertions(+), 1 deletion(-)
-------------------------------------------------------------------------------
commit c650df27b4a4e8d02a079120d3928b494fde7d8a
Author: Reidar Cederqvist <reidar.cederqvist@gmail.com>
Date: 2016-12-08 17:29:34 +0100

    started work on ubus call router.ports info

Base directory -> /
 port.c | 112 ++++++++++++++++++++++++++++++++++++++++++++++-------------------
 1 file changed, 80 insertions(+), 32 deletions(-)
-------------------------------------------------------------------------------
commit 16d9b8b35d9e1268bf31c7f7155e316b94de327c
Author: Reidar Cederqvist <reidar.cederqvist@gmail.com>
Date: 2016-12-08 13:40:52 +0100

    started work on ubus call router.ports info

Base directory -> /
 port.c | 71 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++----
 1 file changed, 67 insertions(+), 4 deletions(-)
-------------------------------------------------------------------------------
commit f25a76771783d2cb76abaf70cff134200d6c271d
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2016-12-01 11:01:53 +0100

    call hotplug script for wps client pbc

Base directory -> /
 wps.c | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)
-------------------------------------------------------------------------------
commit 742d37539c28de5793123f98debd0d0cf91c921b
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2016-11-25 18:56:21 +0100

    initial mtk wps support

Base directory -> /
 wps.c | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
-------------------------------------------------------------------------------
commit 0d6c9e55eff8f9c47b106b6e7dc8b570814db560
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2016-11-19 11:56:35 +0100

    remove unterminated define

Base directory -> /
 broadcom.h | 3 ---
 1 file changed, 3 deletions(-)
-------------------------------------------------------------------------------
commit 05931f2ebbd9d177766211ce8652a0e493f77ec0
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2016-11-18 18:43:37 +0100

    mtk: zero tx and rx bytes until we get them correctly

Base directory -> /
 mediatek.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
-------------------------------------------------------------------------------
commit b6c070dbc2b5bb8900c0816221357d35c3f34272
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2016-11-18 18:37:21 +0100

    put endif to correct line

Base directory -> /
 network.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
-------------------------------------------------------------------------------
commit c2d1d1f91066f379cf734d384b4802e9ce7a6345
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2016-11-18 18:28:49 +0100

    mtk: cleanup

Base directory -> /
 mediatek.c | 6 ++++--
 mediatek.h | 2 +-
 network.c  | 2 +-
 port.c     | 2 +-
 wireless.c | 4 ++--
 5 files changed, 9 insertions(+), 7 deletions(-)
-------------------------------------------------------------------------------
commit 60f8a4f011193318940957f953fc8325555d6019
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2016-11-18 18:03:31 +0100

    mtk: show speed correctly

Base directory -> /
 mediatek.c | 31 ++++++++++++++++++++-----------
 network.c  |  4 ++--
 2 files changed, 22 insertions(+), 13 deletions(-)
-------------------------------------------------------------------------------
commit 29f1216ce20e12ec9f809aab5241809b76b7d417
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2016-11-18 10:04:08 +0100

    mtk: fix some warnings

Base directory -> /
 mediatek.c | 2 ++
 wireless.c | 4 +++-
 2 files changed, 5 insertions(+), 1 deletion(-)
-------------------------------------------------------------------------------
commit 281582d93db2f7bee0308af7f1046813e6e77b98
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2016-11-18 10:02:01 +0100

    mtk: get rssi value correctly

Base directory -> /
 mediatek.c | 46 +++++++++++++++++++++++++++++++++++++---------
 wireless.c |  9 +++++++--
 2 files changed, 44 insertions(+), 11 deletions(-)
-------------------------------------------------------------------------------
commit bd198fb2053995e3dda4b9328c3ae497d222b408
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2016-11-18 09:23:22 +0100

    mtk: get wireless clients from assoclist

Base directory -> /
 network.c | 43 +++++++++----------------------------------
 1 file changed, 9 insertions(+), 34 deletions(-)
-------------------------------------------------------------------------------
commit c176fbea2da70fc121dfa4465a845b9f43e60db1
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2016-11-17 16:46:12 +0100

    mtk: more cleanup

Base directory -> /
 broadcom.c      |   8 ++---
 led.internet.sh |  19 -----------
 mediatek.c      | 100 +++++++++++++++++++++++++++++++-------------------------
 mediatek.h      |  12 -------
 wireless.c      |   2 ++
 5 files changed, 61 insertions(+), 80 deletions(-)
-------------------------------------------------------------------------------
commit 72955557485a35f0a24d3910ceaa93d43d141803
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2016-11-17 15:22:46 +0100

    mtk: header file cleanup

Base directory -> /
 broadcom.h |    2 -
 mediatek.c |   63 ++-
 mediatek.h | 1249 +++++-------------------------------------------------------
 3 files changed, 151 insertions(+), 1163 deletions(-)
-------------------------------------------------------------------------------
commit 240ae2dd34195c7aa522a033a8f4c2c2f0b751b8
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2016-11-17 11:08:32 +0100

    mtk: ioctl working

Base directory -> /
 mediatek.c | 11 +++++++----
 mediatek.h |  5 ++++-
 2 files changed, 11 insertions(+), 5 deletions(-)
-------------------------------------------------------------------------------
commit a0f8a62e77abc3213eb058e15024e0b65ad7b13c
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2016-11-15 15:37:13 +0100

    mediatek code cleanup

Base directory -> /
 mediatek.c |  259 +--------
 mediatek.h | 1798 ++++++++++++++++++++++++++++++++++++++++--------------------
 network.c  |    4 +-
 3 files changed, 1232 insertions(+), 829 deletions(-)
-------------------------------------------------------------------------------
commit 77c431ea19a9591f6f16b18fe87b93d4966c83d8
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2016-10-18 14:24:09 +0200

    use same get port name method for brcm and mtk

Base directory -> /
 port.c | 18 ++++--------------
 1 file changed, 4 insertions(+), 14 deletions(-)
-------------------------------------------------------------------------------
commit 4ad37fba96cda34eb0c8a4e1461fda0ada613b00
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2016-10-18 11:37:00 +0200

    for mtk read encryption from config for now

Base directory -> /
 mediatek.c | 39 ++++-----------------------------------
 1 file changed, 4 insertions(+), 35 deletions(-)
-------------------------------------------------------------------------------
commit dd9a00df1557ff4689476bd629dd743123b06de9
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2016-10-18 11:27:16 +0200

    show real speed for mtk

Base directory -> /
 wireless.c | 4 ++++
 1 file changed, 4 insertions(+)
-------------------------------------------------------------------------------
commit aa7284520b0f702cd93a6318a1a2cc3458aec0d0
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2016-10-18 11:23:42 +0200

    zero device char array first

Base directory -> /
 wireless.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
-------------------------------------------------------------------------------
commit 3d6140a57955863f89b622aff10fc6b1c659463d
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2016-10-18 11:23:18 +0200

    calculate wdev correctly for mtk

Base directory -> /
 wireless.c | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)
-------------------------------------------------------------------------------
commit 8ff56ee03760ac14fa0e012537cb35b64a7e7854
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2016-10-18 10:58:46 +0200

    mediatek updates

Base directory -> /
 mediatek.c | 64 --------------------------------------------------------------
 port.c     |  4 ----
 2 files changed, 68 deletions(-)
-------------------------------------------------------------------------------
commit 148584bafc8c3700bf0308d1549c4cddb47673ed
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2016-10-14 17:15:58 +0200

    mediatek: hardcode sta info until we know how to get it

Base directory -> /
 mediatek.c | 59 ++++++-----------------------------------------------------
 1 file changed, 6 insertions(+), 53 deletions(-)
-------------------------------------------------------------------------------
commit 74023cc960434bc4b24af7f1eea6c663abba9d28
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2016-10-14 15:44:17 +0200

    mediatek: network topology almost working

Base directory -> /
 mediatek.c | 15 +--------------
 network.c  | 27 ++++++++++++++++++++-------
 port.c     | 16 ++++++++++++----
 3 files changed, 33 insertions(+), 25 deletions(-)
-------------------------------------------------------------------------------
commit c8432358b253a29086881fc0d09a83a2d47f6f8b
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2016-10-10 19:55:10 +0200

    imitate led.internet object

Base directory -> /
 led.internet.sh | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)
-------------------------------------------------------------------------------
commit e3748e841fe2614f01f7b25244f8a157993582d5
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2016-10-10 19:49:43 +0200

    initial mediatek wireless code

Base directory -> /
 mediatek.c | 203 ++++++++++++++++++++++++++++---------------------------------
 network.c  |   2 -
 port.c     |   5 ++
 questd.c   |   4 --
 wireless.c |  21 ++++++-
 wps.c      |   4 +-
 6 files changed, 120 insertions(+), 119 deletions(-)
-------------------------------------------------------------------------------
commit 06a2d5c281e09867269ee1954d675e297d90e3bd
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2016-10-10 17:58:13 +0200

    mediatek

Base directory -> /
 Makefile           |   6 +-
 dumper.c           |  32 +++
 mediatek.c         | 611 ++++++++++++++++++++++++++++++++++++++++++++++
 mediatek.h         | 691 +++++++++++++++++++++++++++++++++++++++++++++++++++++
 mtkwifi_channels.h | 393 ++++++++++++++++++++++++++++++
 network.c          |  13 +-
 network.h          |   5 +-
 port.c             |  14 +-
 questd.c           |   4 +-
 questd.h           |   2 -
 uboot_env.c        |   2 +-
 wireless.c         |   4 -
 12 files changed, 1758 insertions(+), 19 deletions(-)
-------------------------------------------------------------------------------
commit 26cf2e98f13f2511fbd5f7879da9715a01e7fc81
Author: Reidar Cederqvist <reidar.cederqvist@gmail.com>
Date: 2017-01-10 14:26:14 +0100

    added a directory object with folder_tree function

Base directory -> /
 Makefile    |   4 +-
 directory.c | 147 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 directory.h |   1 +
 questd.c    |   1 +
 questd.h    |   1 +
 5 files changed, 152 insertions(+), 2 deletions(-)
-------------------------------------------------------------------------------
2017-01-11 10:16:24 +01:00
Sukru Senli
db54b7165f questd-3.1.27 2017-01-10 13:10:05 +01:00
Sukru Senli
3d02f139b4 brcmwifi: use bandsteering option instead of bsd 2017-01-05 11:41:05 +01:00
Sukru Senli
9fe6844f61 questd-3.1.26 2017-01-05 10:51:10 +01:00
Sukru Senli
3bc7e1f27f layer2interface: brcmwifi: add dhdctl command for radar messages 2017-01-03 12:41:43 +01:00
Sukru Senli
436089b432 icwmp-3.0-2017-01-02 2017-01-03 10:07:20 +01:00
Sukru Senli
7356870093 icwmp-3.0-2016-12-30 2017-01-02 16:19:36 +01:00
Sukru Senli
bbe890c36b icwmp-3.0-2016-12-29 2016-12-29 16:39:58 +01:00
Sukru Senli
94725e8e68 icwmp-3.0-2016-12-28 2016-12-28 14:19:26 +01:00
Sukru Senli
7cc38e0625 icwmp-3.0-2016-12-22 2016-12-28 09:32:25 +01:00
Erik Horemans
56f334af49 new ice-client 4.1.0-RC8 2016-12-27 17:08:30 +01:00
Sukru Senli
0c490c89a5 inteno-netmodes: autoswtich mode for repeater_dualdown as well 2016-12-23 14:07:45 +01:00
Sukru Senli
84c6f751aa iop: genconfig updated 2016-12-23 10:25:49 +01:00
Sukru Senli
e4784566d0 iop: genconfig: support getting themes from customerconfigs 2016-12-23 09:56:49 +01:00
Sukru Senli
625624ac76 icwmp updated 2016-12-22 09:52:46 +01:00
Sukru Senli
703aac1b4c icwmp-3.0-2016-12-21 2016-12-21 17:57:13 +01:00
Sukru Senli
a40e0c6f52 brcmwifi: change bsd policy to rssi threshold based 2016-12-21 10:44:44 +01:00
Sukru Senli
1da89a58b6 inteno-netmodes: do not create repeater mode for 2.4 only devices 2016-12-20 12:22:54 +01:00
Sukru Senli
cb81c8fad6 questd-3.1.25 2016-12-19 16:34:33 +01:00
Sukru Senli
22faec3230 icwmp-3.0-2016-12-19 2016-12-19 15:54:43 +01:00
Sukru Senli
805f16b1de remove repeater mode from DG400 and EG400 2016-12-19 13:53:33 +01:00
Sukru Senli
ea72126e80 questd-3.1.26 2016-12-19 10:09:56 +01:00
Erik Horemans
cffb90c2df new ice-client 4.1.0-RC6 2016-12-13 17:42:12 +01:00
Sukru Senli
01d2fe6833 icwmp-3.0-2016-12-07 2016-12-07 14:46:08 +01:00
Sukru Senli
55ccad945a voice-client: make sure voicesec encrypted pasword is saved 2016-12-07 12:51:13 +01:00
imen.bhiri
7e20efba97 Add libtrace 2016-12-06 17:21:11 +01:00
Erik Horemans
365daeb278 new ice-client 4.1.0-RC5 2016-12-02 17:49:42 +01:00
Reidar Cederqvist
92727456cb asterisk: fixed stupid error caused by strange behaviour in network.sh script 2016-12-02 10:34:27 +01:00
Reidar Cederqvist
bb5318f201 Update feed [ feed_inteno_packages ] package [ questd ]
-------------------------------------------------------------------------------
* a53d9b9 removed support for dss keys in dropbear
-------------------------------------------------------------------------------
commit a53d9b949da052a6fb3ad49bff422821853ed0bc
Author: Reidar Cederqvist <reidar.cederqvist@gmail.com>
Date: 2016-12-01 15:07:42 +0100

    removed support for dss keys in dropbear

Base directory -> /
 dropbear.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
-------------------------------------------------------------------------------
2016-12-01 15:08:30 +01:00
Erik Horemans
a66af826a1 new ice-client 4.1.0-RC4 2016-11-30 15:16:12 +01:00
Martin Lindberg
b03c76dfb9 Update feed [ feed_inteno_packages ] package [ asterisk18-mod ]
-------------------------------------------------------------------------------
* 62c3764 Adding possibility to get DTMF and RTP in syslog
-------------------------------------------------------------------------------
commit 62c3764e6765fa9b1d22cb5dda26476e4742bdcf
Author: Martin Lindberg <martin.lindberg@evidente.se>
Date: 2016-11-30 11:18:40 +0100

    Adding possibility to get DTMF and RTP in syslog

    If enabled (done from voice_client conf file) the following logging will be
    added.
    - Every state changes in brcm
    - At call source and destination numbers
    - At hangup RTP statistics

Base directory -> /
 channels/chan_brcm.c |  80 +++++----
 channels/chan_sip.c  | 462 ++++++++++++++++++++++++++-------------------------
 main/channel.c       | 168 ++++++++++---------
 3 files changed, 375 insertions(+), 335 deletions(-)
-------------------------------------------------------------------------------
2016-11-30 11:27:57 +01:00
Sukru Senli
661c1b2a5a icwmp-3.0-2016-11-24 2016-11-30 10:12:14 +01:00
Martin Lindberg
95d45b3381 Update feed [ feed_inteno_packages ] package [ asterisk18-mod ]
-------------------------------------------------------------------------------
* 77854a6 Fix for led handling
-------------------------------------------------------------------------------
commit 77854a6ec695442122a435f36af1ce5e7e6a488a
Author: Martin Lindberg <martin.lindberg@evidente.se>
Date: 2016-11-28 15:05:18 +0100

    Fix for led handling

    Near side termination led continues to blink until next register interval or
    offhook/onhook

Base directory -> /
 res/res_voice.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
-------------------------------------------------------------------------------
2016-11-29 13:32:52 +01:00
Sukru Senli
e0cd51c35f iop: add common.diff first 2016-11-28 13:28:49 +01:00
Sukru Senli
267fa988d6 iop: genconfig fix help message 2016-11-25 20:12:24 +01:00
Alex Oprea
f9392373cc iup: add options 225 and 226 refs #9951 2016-11-25 18:16:26 +01:00
Reidar Cederqvist
08ef748614 updated genconfig to work with new customerconfigs 2016-11-25 14:34:00 +01:00
Ronny Nilsson
37d39e0c2e Update feed [ feed_inteno_packages ] package [ dectmngr2 ]
-------------------------------------------------------------------------------
* 17aa3b1 Sync handset clock when it becomes online
* 715f597 Fix compiler warning
* 359ca6f Merge common strings
* 857e262 Indicate when a handset is busy in a call or changes state to offhook. Both with an event and in the handset "list". refs #9408
* 19cf38c Deny duplicate call setups
* 97fdb0d For factory production we immediately call any registered handset. For normal end users this is a NOP.
* f994070 Test for XAVI EG400 production. Call phone handset automatically when it has registered.
-------------------------------------------------------------------------------
commit 17aa3b1d8d372ebcf4d37379f7cc4fb59c461d4b
Author: Ronny Nilsson <ronny.nilsson@inteno.se>
Date: 2016-11-23 14:59:11 +0100

    Sync handset clock when it becomes online

Base directory -> /
 src/handset.c | 39 ++++++++++++++++++++++++++++++++++++---
 1 file changed, 36 insertions(+), 3 deletions(-)
-------------------------------------------------------------------------------
commit 715f597100cb42ee8f720d45c45ad26e24c5a7be
Author: Ronny Nilsson <ronny.nilsson@inteno.se>
Date: 2016-11-23 14:57:55 +0100

    Fix compiler warning

Base directory -> /
 src/external_call.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
-------------------------------------------------------------------------------
commit 359ca6f29a9c816dd9a84f37ab906574f9312dba
Author: Ronny Nilsson <ronny.nilsson@inteno.se>
Date: 2016-11-23 11:11:57 +0100

    Merge common strings

Base directory -> /
 src/handset.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
-------------------------------------------------------------------------------
commit 857e262b09050300306ad458eb713f4e61f7e788
Author: Ronny Nilsson <ronny.nilsson@inteno.se>
Date: 2016-11-23 11:11:15 +0100

    Indicate when a handset is busy in a call or changes state to offhook. Both
    with an event and in the handset "list". refs #9408

Base directory -> /
 src/external_call.c | 19 ++++++++++++++-
 src/external_call.h |  1 +
 src/ubus.c          | 68 ++++++++++++++++++++++++++++-------------------------
 src/ubus.h          |  2 ++
 4 files changed, 57 insertions(+), 33 deletions(-)
-------------------------------------------------------------------------------
commit 19cf38c0902d846d2d17ac177bcc28710e80fe51
Author: Ronny Nilsson <ronny.nilsson@inteno.se>
Date: 2016-11-23 11:07:35 +0100

    Deny duplicate call setups

Base directory -> /
 src/external_call.c | 1 +
 1 file changed, 1 insertion(+)
-------------------------------------------------------------------------------
commit 97fdb0d2494f2958be87b82f8857837368244611
Author: Ronny Nilsson <ronny.nilsson@inteno.se>
Date: 2016-11-02 12:53:44 +0100

    For factory production we immediately call any registered handset. For
    normal end users this is a NOP.

Base directory -> /
 src/handset.c    |  7 ++-----
 src/ubus-dummy.c | 26 ++++++++++++++++++++++++--
 src/ubus.c       |  8 ++++++++
 src/ubus.h       |  2 ++
 4 files changed, 36 insertions(+), 7 deletions(-)
-------------------------------------------------------------------------------
commit f9940703522b66061ddf4bb6581e88eeb64b6ea1
Author: Ronny Nilsson <ronny.nilsson@inteno.se>
Date: 2016-11-01 17:34:16 +0100

    Test for XAVI EG400 production. Call phone handset automatically when it has
    registered.

Base directory -> /
 src/handset.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
-------------------------------------------------------------------------------
2016-11-23 16:21:55 +01:00
Sukru Senli
dd385b48d1 icwmp-3.0-2016-11-23 2016-11-23 14:33:41 +01:00
Sukru Senli
9d138db4b2 iop: replace busybox wget with wget package 2016-11-22 11:19:14 +01:00
Sukru Senli
cb7b42c053 Update feed [ feed_inteno_packages ] package [ questd ]
-------------------------------------------------------------------------------
* e59f0ba show encryption correctly
-------------------------------------------------------------------------------
commit e59f0baafb9f8941e0ecd5cebc953d640ec0525b
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2016-11-22 10:52:58 +0100

    show encryption correctly

Base directory -> /
 wireless.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
-------------------------------------------------------------------------------
2016-11-22 10:53:19 +01:00
Martin Lindberg
029ea2e421 Merge branch 'martinl-#7318' into devel 2016-11-22 08:49:12 +01:00
Sukru Senli
d716d0acf9 Update feed [ feed_inteno_packages ] package [ questd ]
-------------------------------------------------------------------------------
* 0c67997 usb: show filesystem as well
-------------------------------------------------------------------------------
commit 0c67997d43ede911bafc7648cb828cc9c4807e3a
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2016-11-21 19:53:46 +0100

    usb: show filesystem as well

Base directory -> /
 usb.c | 16 ++++++++--------
 usb.h |  1 +
 2 files changed, 9 insertions(+), 8 deletions(-)
-------------------------------------------------------------------------------
2016-11-21 19:54:27 +01:00
Sukru Senli
b1b0d943d5 brcmwifi: monitor mode support 2016-11-21 19:14:39 +01:00
Sukru Senli
8795d9e33a inteno-netmodes: added repeater mode for all boards except DG150 and DG150v2 2016-11-21 18:08:01 +01:00
Martin Lindberg
44b177be66 Ticket #7318 Syslog reporting
Adding possibility to enablöe CDR logging to syslog.
2016-11-18 15:34:31 +01:00
Sukru Senli
850ee347fd brcmwifi: fix reverse steering policy 2016-11-18 12:42:14 +01:00
Sukru Senli
0138e62150 icwmp-3.0-2016-11-15 2016-11-16 12:02:36 +01:00
Sukru Senli
2b39fd9b62 libtrace package 2016-11-14 13:44:53 +01:00
Reidar Cederqvist
a8fd92202f fixed splling error 2016-11-14 13:17:29 +01:00
Reidar Cederqvist
bf7c00a79f added -u option to update_package 2016-11-14 13:06:07 +01:00
Jonas Höglund
db132ac5fa Define NATALIE_OPEN 2016-11-14 10:58:36 +01:00
Jonas Höglund
1617952d52 Revert "iop: genconfig: set NATALIE_OPEN correctly"
This reverts commit 94267e3d7a.
2016-11-14 10:19:47 +01:00
Sukru Senli
db50e5cd71 logrotate package added 2016-11-11 09:54:17 +01:00
Sukru Senli
c061cc8408 brcmwifi: steer to correct radio 2016-11-10 12:57:00 +01:00
Sukru Senli
fa0506d8ce brcmwifi: initial bsd code with pre-defiend policies 2016-11-10 12:27:57 +01:00
Martin Lindberg
ccf5ebd1f4 Ticket #10068 Handle blocking of special rate calls.
Tweek format of handling of regex to detect special rate calles.
2016-11-09 15:51:32 +01:00
Sukru Senli
6f6ccb924a brcmwifi: force enable obss_coex 2016-11-09 10:16:38 +01:00
Sukru Senli
f08ab2223c Update feed [ feed_inteno_packages ] package [ questd ]
-------------------------------------------------------------------------------
* 889e317 show client as wireless only if it is associated
-------------------------------------------------------------------------------
commit 889e317f0de3917a4f46de94c3d66d0819e6b9a3
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2016-11-08 15:11:46 +0100

    show client as wireless only if it is associated

Base directory -> /
 broadcom.c | 6 +++++-
 broadcom.h | 2 +-
 network.c  | 5 ++++-
 wireless.c | 4 +++-
 4 files changed, 13 insertions(+), 4 deletions(-)
-------------------------------------------------------------------------------
2016-11-08 15:12:54 +01:00
Sukru Senli
df1978f7c4 Update feed [ feed_inteno_packages ] package [ questd ]
-------------------------------------------------------------------------------
* 5b3d4db add is_inteno_macaddr function
* c9074d8 adapt to new Inteno mac address range
-------------------------------------------------------------------------------
commit 5b3d4dbb769965367c1a578490c3b71b4d39770e
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2016-11-08 13:54:03 +0100

    add is_inteno_macaddr function

Base directory -> /
 Makefile      |  4 ++--
 network.c     | 12 ++++++------
 tools.c       | 10 ++++++++++
 tools.h       |  2 ++
 wificontrol.c | 38 ++++++--------------------------------
 5 files changed, 26 insertions(+), 40 deletions(-)
-------------------------------------------------------------------------------
commit c9074d8b3a7de736c6745d5dee1a8bed666b36fa
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2016-11-08 13:34:44 +0100

    adapt to new Inteno mac address range

Base directory -> /
 network.c     | 13 ++++++++-----
 wificontrol.c |  4 ++--
 2 files changed, 10 insertions(+), 7 deletions(-)
-------------------------------------------------------------------------------
2016-11-08 13:54:33 +01:00
Sukru Senli
800d8d5075 Update feed [ feed_inteno_packages ] package [ questd ]
-------------------------------------------------------------------------------
* 994ebba router.network ports do not show the bridge without member
-------------------------------------------------------------------------------
commit 994ebbaa5897c5b27aca9dbe188f3a257e02691e
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2016-11-08 12:38:40 +0100

    router.network ports do not show the bridge without member

Base directory -> /
 network.c | 4 ++++
 1 file changed, 4 insertions(+)
-------------------------------------------------------------------------------
2016-11-08 12:39:12 +01:00
Sukru Senli
d5413838e1 questd-3.1.23 2016-11-07 17:28:15 +01:00
Sukru Senli
ee8ae8c13f inteno-netmodes: repeater modes use 80MHz for 5G band 2016-11-07 16:49:33 +01:00
Sukru Senli
52652dd042 Update feed [ feed_inteno_packages ] package [ questd ]
-------------------------------------------------------------------------------
* d1079f3 find usb netdevice for both arm and mips
-------------------------------------------------------------------------------
commit d1079f32b14282cdc1ce2da736684bc505ed293b
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2016-11-07 15:38:44 +0100

    find usb netdevice for both arm and mips

Base directory -> /
 usb.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
-------------------------------------------------------------------------------
2016-11-07 15:39:21 +01:00
Sukru Senli
2afc1d59c9 icwmp-3.0-2016-11-03 2016-11-04 10:47:42 +01:00
Sukru Senli
c40b31720f natalie-dect: create target dir for install 2016-11-03 09:12:29 +01:00
Sukru Senli
930ff414cb inteno-netmodes: update firewall configs 2016-11-02 17:31:58 +01:00
Sukru Senli
87afc76177 natalie-dect: fix open build 2016-11-02 16:40:18 +01:00
Sukru Senli
94267e3d7a iop: genconfig: set NATALIE_OPEN correctly 2016-11-02 16:33:55 +01:00
Sukru Senli
387fb9ebf8 Update feed [ feed_inteno_packages ] package [ questd ]
-------------------------------------------------------------------------------
* 52ee23c populate ports only for bridged networks that are not dhcp
-------------------------------------------------------------------------------
commit 52ee23cb217321c92537d116eebba79c3c8966b8
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2016-11-02 11:30:37 +0100

    populate ports only for bridged networks that are not dhcp

Base directory -> /
 network.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)
-------------------------------------------------------------------------------
2016-11-02 11:31:29 +01:00
Sukru Senli
e8dc59ac6b inteno-netmodes: update repeate mode DETAILS 2016-11-02 11:08:15 +01:00
Alex Oprea
eeb5d0a0af Update feed [ feed_inteno_packages ] package [ questd ]
-------------------------------------------------------------------------------
* 70d2897 prevent memory corruption for "client-100" and higher
* eea1ad8 improve short-circuit logic
-------------------------------------------------------------------------------
commit 70d289767aa38483c375b4913f9aff58e71978c4
Author: Alex Oprea <alex.oprea@inteno.se>
Date: 2016-11-01 13:44:05 +0100

    prevent memory corruption for "client-100" and higher

Base directory -> /
 network.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)
-------------------------------------------------------------------------------
commit eea1ad881ad50d69869dd292bb95b24547ae1ab3
Author: Alex Oprea <alex.oprea@inteno.se>
Date: 2016-11-01 13:55:49 +0100

    improve short-circuit logic

Base directory -> /
 network.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
-------------------------------------------------------------------------------
2016-11-01 18:12:07 +01:00
42 changed files with 1546 additions and 410 deletions

View File

@@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=asterisk18-mod
PKG_VERSION:=1.8.10.1
PKG_SOURCE_VERSION:=015d279241d0ac5d8c1321aa6f78b9ae551575d1
PKG_SOURCE_VERSION:=62c3764e6765fa9b1d22cb5dda26476e4742bdcf
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=http://public.inteno.se:/asterisk-1.8.x
@@ -455,6 +455,8 @@ define Package/asterisk18-mod/install
$(INSTALL_DATA) ./files/asterisk.default $(1)/etc/default/asterisk
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_BIN) ./files/asterisk.init $(1)/etc/init.d/asterisk
$(INSTALL_DIR) $(1)/etc/hotplug.d/iface
$(INSTALL_BIN) ./files/asterisk.hotplug $(1)/etc/hotplug.d/iface/80-asterisk
endef
define Package/asterisk18-mod-sounds/install

View File

@@ -0,0 +1,18 @@
#!/bin/sh
[ "$ACTION" = ifup ] || exit 0
config_load voice_client
config_get bindintf SIP bindintf
[ "$INTERFACE" == "$bindintf" ] || exit 0
. /lib/functions/network.sh
if [ -n "$bindintf" ]; then
network_get_ipaddr bindaddr "$bindintf"
bindaddr="${bindaddr:-0.0.0.0}"
sed -i "s/bindaddr=.*/bindaddr=$bindaddr/g" /etc/asterisk/sip.conf
[ -e /var/run/asterisk/asterisk.ctl ] && /etc/init.d/asterisk reload
fi

View File

@@ -9,25 +9,9 @@ USE_PROCD=1
NAME=asterisk
PROG=/usr/sbin/asterisk
DEFAULT=/etc/default/asterisk
CONFDIR=/etc/asterisk
init_asterisk() {
# do not start asterisk until the
# router receives a default route
config_load voice_client
local bindintf
config_get bindintf SIP bindintf ""
if [ "$bindintf" == "" ]; then
while ! ip r | grep -q default; do
sleep 1
done
else
network_get_ipaddr ip "$bindintf"
while [ "$ip" == "" ]; do
sleep 1
network_get_ipaddr ip "$bindintf"
done
fi
[ -f $DEFAULT ] && . $DEFAULT
[ -d /var/run/asterisk ] || mkdir -p /var/run/asterisk
[ -d /var/log/asterisk ] || mkdir -p /var/log/asterisk
@@ -55,6 +39,7 @@ start_service() {
}
reload_service() {
asterisk -rx "config reload $CONFDIR/sip.conf"
asterisk -rx "core reload"
asterisk -rx "dialplan reload"
asterisk -rx "brcm reload"

View File

@@ -11,7 +11,7 @@ PKG_RELEASE:=1
PKG_VERSION:=1.1.0
PKG_SOURCE_URL:=http://public.inteno.se:/dectmngr2
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=3191d38385c8e46c3888859f196e41c7db4447bc
PKG_SOURCE_VERSION:=17aa3b1d8d372ebcf4d37379f7cc4fb59c461d4b
PKG_NAME:=dectmngr2

View File

@@ -19,14 +19,14 @@ export PLATFORM_INCLUDE:=platforms/iopsys/build.mk
export DATE:=$(shell date +%Y-%m-%d-%H-%M-%S)
export LOGIN:=$(shell whoami)
BASE_PKG_VERSION:=4.0.1
PKG_RELEASE:=RC17
BASE_PKG_VERSION:=4.1.0
PKG_RELEASE:=RC8
PKG_VERSION:=$(BASE_PKG_VERSION)-$(PKG_RELEASE)_$(DATE)_$(LOGIN)
export PKG_VERSION
###########################--RELEASE--################################
PKG_SOURCE_VERSION:=97a3da5fae8b5374a598c78346cb11477c85e293
PKG_SOURCE_VERSION:=5d13d0034c0174cdb6d66f09a458851fe54d810e
ifeq ($(CONFIG_ICE_OPEN),y)
BRCM_KERNEL_PROFILE=$(shell echo $(CONFIG_BCM_KERNEL_PROFILE) | sed s/\"//g)
PKG_SOURCE_URL:=http://iopsys.inteno.se/iopsys/consumer/
@@ -45,7 +45,7 @@ endif
###########################--RELEASE--################################
#include $(INCLUDE_DIR)/uclibc++.mk
include $(INCLUDE_DIR)/uclibc++.mk
include $(INCLUDE_DIR)/package.mk
define Package/ice-client/Default
@@ -58,8 +58,7 @@ define Package/ice-client
$(call Package/ice-client/Default)
TITLE:=ice-client
MENU:=1
DEPENDS:=+libopenssl +libstdcpp +libubus +ubus +ubusd +jshn +libubox +libpthread
# DEPENDS:=+libopenssl +uclibcxx +libubus +ubus +ubusd +jshn +libubox +libpthread
DEPENDS:=+libopenssl +uclibcxx +libubus +ubus +ubusd +jshn +libubox +libpthread
endef
define Package/ice-client/config
@@ -79,7 +78,7 @@ endef
# PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)-$(BASE_PKG_VERSION)
#
#
# These settings allow you to specify a soruce folder where your source code is located
# These settings allow you to specify a source folder where your source code is located
# This avoids having to tar-zip or fetch from git each time
# Changes can be done in your sources while the build is performed somewhere else
# If you forget some settings, your source folder will be deleted!!! So be carefull and

View File

@@ -8,11 +8,11 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=icwmp
PKG_VERSION:=3.0-2016-10-20
PKG_VERSION:=3.0-2017-01-20
PKG_FIXUP:=autoreconf
PKG_SOURCE_URL:=http://public.inteno.se:/icwmp.git
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=fdaa1daa184205fe256bb155b7fb0f29a034baaa
PKG_SOURCE_VERSION:=5c39d8d99127010c8d553495cd318ced80531a04
PKG_RELEASE=$(PKG_SOURCE_VERSION)
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
@@ -34,7 +34,7 @@ define Package/icwmp/Default
SECTION:=utils
CATEGORY:=Utilities
TITLE:=CWMP client
DEPENDS:=+libuci +libmicroxml +libubox +jshn +libubus +libblobmsg-json +libpthread +ubusd +shflags +getopt +zlib +libjson-c +libopenssl +libexpat +libstrophe +curl
DEPENDS:=+libuci +libmicroxml +libubox +jshn +libubus +libblobmsg-json +libpthread +ubusd +shflags +getopt +zlib +libjson-c +libopenssl +libexpat +libstrophe +curl +libtrace
endef
define Package/icwmp/description

View File

@@ -4,7 +4,6 @@
include /lib/network
[ "$INTERFACE" != "$(uci get layer2_interface_ethernet.Wan.ifname)" ] && exit
[ "$(uci get netmode.setup.curmode)" != "repeater" ] && exit
case "$(uci get netmode.setup.curmode)" in
repeater|repeater_dualdown) echo "Preparing to switch mode" ;;

View File

@@ -69,6 +69,13 @@ populate_netmodes() {
local hardware=$(db get hw.board.hardware)
local keys lang desc exp exclude
for mode in $(ls $modedir); do
case "$mode" in
repeater*)
wlctl -i wl1 ap >/dev/null 2>&1 || continue
;;
esac
lang=""
desc=""
exp=""

View File

@@ -1,3 +1,6 @@
config settings 'settings'
option disabled '0'
config defaults
option syn_flood 1
option input ACCEPT

View File

@@ -1,3 +1,6 @@
config settings 'settings'
option disabled '0'
config defaults
option syn_flood 1
option input ACCEPT

View File

@@ -1,18 +1,20 @@
{
"description": [
{ "en" : "Repeater 2.4▴▾2.4&5" },
{ "sv" : "Repeater 2.4▴▾2.4&5" }
{ "en" : "Repeater 2.4▴▾5" },
{ "sv" : "Repeater 2.4▴▾5" }
],
"explanation": [
{ "en" : "Your router is going to act as a wired extender or wireless repeater to the selected Wireless Access Point. Uplink 2.4G & Downlink 2.4G + 5G" },
{ "sv" : "Routern kommer att fungera som en trådbunden extender eller trådlös repeater till den valda trådlösa åtkomstpunkten. Uplink 2.4G & Downlink 2.4G + 5G" }
{ "en" : "Your router is going to act as a wired extender or wireless repeater to the selected Wireless Access Point. Uplink 2.4G & Downlink 5G" },
{ "sv" : "Routern kommer att fungera som en trådbunden extender eller trådlös repeater till den valda trådlösa åtkomstpunkten. Uplink 2.4G & Downlink 5G" }
],
"excluded_boards" : [
"DG*",
"EG*",
"VG*"
"DG15*",
"DG40*",
"EG40*"
],
"acl" : [
"admin"
],
"credentials" : 1,
"reboot" : 0
}

View File

@@ -1,3 +1,6 @@
config settings 'settings'
option disabled '0'
config defaults
option syn_flood 1
option input ACCEPT
@@ -8,7 +11,6 @@ config defaults
config zone
option name lan
list network 'lan'
option input ACCEPT
option output ACCEPT
option forward ACCEPT

View File

@@ -11,14 +11,6 @@ config interface 'wan'
option proto 'dhcp'
option vendorid 'Inteno_Repeater_$MAC4'
option hostname 'Inteno_Repeater_$MAC4'
option ifname '$WAN.1'
option ifname '$WAN.1 $LAN1 $LAN2 $LAN3 $LAN4'
option reqopts '43'
config interface 'lan'
option is_lan '1'
option type 'bridge'
option proto 'static'
option ifname '$LAN1 $LAN2 $LAN3 $LAN4'
option ipaddr '192.168.11.1'
option netmask '255.255.255.0'

View File

@@ -8,7 +8,7 @@ config wifi-device 'wl0'
option type 'broadcom'
option country 'EU/13'
option band 'a'
option bandwidth '20'
option bandwidth '80'
option hwmode '11ac'
option channel 'auto'
option scantimer '15'

View File

@@ -1,18 +1,20 @@
{
"description": [
{ "en" : "Repeater 2.4▴▾5" },
{ "sv" : "Repeater 2.4▴▾5" }
{ "en" : "Repeater 2.4▴▾2.4&5" },
{ "sv" : "Repeater 2.4▴▾2.4&5" }
],
"explanation": [
{ "en" : "Your router is going to act as a wired extender or wireless repeater to the selected Wireless Access Point. Uplink 2.4G & Downlink 5G" },
{ "sv" : "Routern kommer att fungera som en trådbunden extender eller trådlös repeater till den valda trådlösa åtkomstpunkten. Uplink 2.4G & Downlink 5G" }
{ "en" : "Your router is going to act as a wired extender or wireless repeater to the selected Wireless Access Point. Uplink 2.4G & Downlink 2.4G + 5G" },
{ "sv" : "Routern kommer att fungera som en trådbunden extender eller trådlös repeater till den valda trådlösa åtkomstpunkten. Uplink 2.4G & Downlink 2.4G + 5G" }
],
"excluded_boards" : [
"DG*",
"EG*",
"VG*"
"DG15*",
"DG40*",
"EG40*"
],
"acl" : [
"admin"
],
"credentials" : 1,
"reboot" : 0
}

View File

@@ -1,3 +1,6 @@
config settings 'settings'
option disabled '0'
config defaults
option syn_flood 1
option input ACCEPT
@@ -8,7 +11,6 @@ config defaults
config zone
option name lan
list network 'lan'
option input ACCEPT
option output ACCEPT
option forward ACCEPT

View File

@@ -11,14 +11,6 @@ config interface 'wan'
option proto 'dhcp'
option vendorid 'Inteno_Repeater_$MAC4'
option hostname 'Inteno_Repeater_$MAC4'
option ifname '$WAN.1'
option ifname '$WAN.1 $LAN1 $LAN2 $LAN3 $LAN4'
option reqopts '43'
config interface 'lan'
option is_lan '1'
option type 'bridge'
option proto 'static'
option ifname '$LAN1 $LAN2 $LAN3 $LAN4'
option ipaddr '192.168.11.1'
option netmask '255.255.255.0'

View File

@@ -8,7 +8,7 @@ config wifi-device 'wl0'
option type 'broadcom'
option country 'EU/13'
option band 'a'
option bandwidth '20'
option bandwidth '80'
option hwmode '11ac'
option channel 'auto'
option scantimer '15'

View File

@@ -1,5 +1,5 @@
config settings settings
option disabled 0
config settings 'settings'
option disabled '0'
config defaults
option syn_flood 1

View File

@@ -136,6 +136,7 @@ CONFIG_PACKAGE_umbim=y
CONFIG_PACKAGE_uqmi=y
CONFIG_PACKAGE_usb-modeswitch=y
CONFIG_PACKAGE_usbreset=y
CONFIG_PACKAGE_wget=y
CONFIG_PACKAGE_wwan=y
CONFIG_PACKAGE_xl2tpd=y
CONFIG_PACKAGE_zoneinfo-core=y
@@ -185,6 +186,7 @@ CONFIG_BUSYBOX_CONFIG_FEATURE_SECURETTY=y
# CONFIG_BUSYBOX_CONFIG_FEATURE_TFTP_BLOCKSIZE is not set
CONFIG_BUSYBOX_CONFIG_FEATURE_TFTP_GET=y
CONFIG_BUSYBOX_CONFIG_FEATURE_TFTP_PUT=y
# CONFIG_BUSYBOX_CONFIG_WGET is not set
# CONFIG_BUSYBOX_CONFIG_LOGIN_SCRIPTS is not set
# CONFIG_BUSYBOX_CONFIG_LOGIN_SESSION_AS_CHILD is not set
# CONFIG_BUSYBOX_CONFIG_PAM is not set

View File

@@ -1,297 +1,352 @@
#!/bin/bash
function genconfig {
export CLEAN=0
export IMPORT=0
export SRCTREEOVERR=0
export FILEDIR="files/"
export CONFIGPATH="package/feeds/feed_inteno_packages/iop/configs"
export CUSTCONF="customerconfigs"
export VERBOSE=0
export DEVELOPER=0
LOCAL_MIRROR="http://mirror.inteno.se/mirror"
export CLEAN=0
export IMPORT=1
export SRCTREEOVERR=0
export FILEDIR="files/"
export THEMEDIR="themes"
CURRENT_CONFIG_FILE=".current_config_file"
export CONFIGPATH="package/feeds/feed_inteno_packages/iop/configs"
CUSTPATH="customerconfigs"
CUSTREPO="git@private.inteno.se:customerconfigs"
export CUSTCONF="customerconfigs/customers"
export VERBOSE=0
export DEVELOPER=0
LOCAL_MIRROR="http://mirror.inteno.se/mirror"
iopsys_brcm63xx_mips="cg300 cg301 dg150 dg150v2 dg150alv2 dg200 dg200al dg301 dg301al eg300 vg50 vox25"
iopsys_brcm63xx_arm="dg400 eg400"
iopsys_ramips="ex400"
ramips="mt7621"
target="bogus"
masterconfig=1
set_target() {
iopsys_brcm63xx_mips="cg300 cg301 dg150 dg150v2 dg150alv2 dg200 dg200al dg301 dg301al eg300 vg50 vox25"
iopsys_brcm63xx_arm="dg400 eg400"
iopsys_ramips="ex400"
ramips="mt7621"
target="bogus"
masterconfig=1
set_target()
{
local profile=$1
for p in $iopsys_brcm63xx_mips; do
if [ $p == $profile ]; then
target="iopsys_brcm63xx_mips"
return
fi
if [ $p == $profile ]; then
target="iopsys_brcm63xx_mips"
return
fi
done
for p in $iopsys_brcm63xx_arm; do
if [ $p == $profile ]; then
target="iopsys_brcm63xx_arm"
return
fi
if [ $p == $profile ]; then
target="iopsys_brcm63xx_arm"
return
fi
done
for p in $iopsys_ramips; do
if [ $p == $profile ]; then
target="iopsys_ramips"
return
fi
if [ $p == $profile ]; then
target="iopsys_ramips"
return
fi
done
for p in $ramips; do
if [ $p == $profile ]; then
target="ramips"
masterconfig=0
return
fi
if [ $p == $profile ]; then
target="ramips"
masterconfig=0
return
fi
done
}
}
git remote -v | grep -q http || {
DEVELOPER=1
bcmAllowed=0
iceAllowed=0
endptAllowed=0
natalieAllowed=0
allowedRepos="$(ssh -o ConnectTimeout=5 git@private.inteno.se 2>/dev/null | grep -w 'R\|W' | awk '{print$NF}')"
for repo in $allowedRepos; do
case $repo in
bcmkernel) bcmAllowed=1 ;;
ice-client) iceAllowed=1 ;;
endptcfg) endptAllowed=1 ;;
natalie-dect*) natalieAllowed=1 ;;
esac
done
}
v() {
[ "$VERBOSE" -ge 1 ] && echo "$@"
}
usage() {
echo
echo 1>&2 "Usage: $0 [ OPTIONS ] < Board_Type > [ Customer ]"
echo
echo -e " -c|--clean\tRemove all files under ./files and import from config "
echo -e " -v|--verbose\tVerbose"
echo -e " -n|--no-update\tDo NOT! Update customer config before applying"
echo -e " -p|--profile\tSet profile (if exists) default juci"
echo -e " -s|--override\tEnable 'Package source tree override'"
echo -e " -h|--help\tShow this message"
echo -e " -l|--list [customer]\tList all Customers or all boards for one customer"
echo -e " -a|--list-all\tList all Customers and their board types"
echo
echo "Example ./iop genconfig vg50 TELIA"
echo "(if no customerconfig is chosen the Inteno Config will be used)"
echo
exit 0
}
list_customers()
{
local ALL="$1"
local CUSTOMER="$2"
if [ "$CUSTOMER" -a -d "$CUSTCONF/$CUSTOMER" ]; then
local boards="$(ls -1 "$CUSTCONF/$CUSTOMER" | grep -v common)"
if [ "$boards" ]; then
echo "$CUSTOMER has following boards:"
for board in $boards; do
echo -e "\t$board"
done
else
echo "No boards found for $CUSTOMER"
fi
elif [ "$CUSTOMER" ]; then
echo "No customer called $CUSTOMER"
exit 1
elif [ -d $CUSTCONF ]; then
local customers="$(ls -1 $CUSTCONF)"
if [ "$customers" -a "$1" == 1 ]; then
for customer in $customers; do
echo $customer
local boards="$(ls -1 $CUSTCONF/$customer | grep -v common)"
if [ "$boards" ]; then
for board in $boards; do
echo -e "\t$board"
done
else
echo "has no boards"
fi
done
elif [ "$customers" ]; then
echo -e "$customers"
else
echo "no customers found"
fi
else
echo "No $CUSTCONF folder found"
fi
exit 0
}
git remote -v | grep -q http || {
DEVELOPER=1
use_local_mirror()
{
if wget -T 3 -t 2 -O /dev/null $LOCAL_MIRROR >/dev/null 2>/dev/null; then
echo "mirror [$LOCAL_MIRROR] exists. Using local mirror"
sed -i "s;CONFIG_LOCALMIRROR=.*;CONFIG_LOCALMIRROR=\"$LOCAL_MIRROR\";" .config
else
echo "mirror [$LOCAL_MIRROR] does not exist. Not using local mirror"
fi
}
bcmAllowed=0
iceAllowed=0
endptAllowed=0
natalieAllowed=0
allowedRepos="$(ssh -o ConnectTimeout=5 git@private.inteno.se 2>/dev/null | grep -w 'R\|W' | awk '{print$NF}')"
for repo in $allowedRepos; do
case $repo in
bcmkernel) bcmAllowed=1 ;;
ice-client) iceAllowed=1 ;;
endptcfg) endptAllowed=1 ;;
natalie-dect*) natalieAllowed=1 ;;
esac
done
}
v() {
[ "$VERBOSE" -ge 1 ] && echo "$@"
}
usage() {
echo
echo 1>&2 "Usage: $0 [OPTIONS] BoardConfig Customerconfig"
echo
echo " -c, remove all files under ./files and import from config "
echo " -v, verbose"
echo " -u, Update customer config before applying"
echo " -p, set profile (if exists)"
echo " -t, use latest git tag and number of commits since as version for the build"
echo " -s, enable 'Package source tree override'"
echo
echo "BoardConfig ex "
ls -1 configs
if [ -d "$CUSTCONF/$1" ]; then
echo "Customerconfig ex"
ls $CUSTCONF/*
fi
echo
echo "Example ./genconfig vg50 TELIA"
echo "(if no customerconfig is chosen the Inteno Config will be used)"
echo
exit 127
}
use_local_mirror()
{
if wget -T 3 -t 2 -O /dev/null $LOCAL_MIRROR >/dev/null 2>/dev/null
then
echo "mirror [$LOCAL_MIRROR] exists. Using local mirror"
sed -i "s;CONFIG_LOCALMIRROR=.*;CONFIG_LOCALMIRROR=\"$LOCAL_MIRROR\";" .config
else
echo "mirror [$LOCAL_MIRROR] does not exist. Not using local mirror"
fi
}
generate_config()
{
generate_config()
{
DIFFFILE="$1"
MASTERFILE="$2"
while read p; do
v "$p"
sed -r -i "$p" $MASTERFILE
v "$p"
sed -r -i "$p" $MASTERFILE
done < $DIFFFILE
}
}
setup_dirs()
{
if [ $DEVELOPER -eq 1 ]; then
if [ ! -d "$CUSTCONF" ]; then
git clone git@private.inteno.se:customerconfigs
elif [ $IMPORT -eq 1 ]; then
cd customerconfigs
v "git pull"
git pull
cd ..
fi
setup_dirs()
{
if [ $DEVELOPER -eq 1 ]; then
if [ ! -d "$CUSTPATH" ]; then
git clone "$CUSTREPO" "$CUSTPATH"
elif [ $IMPORT -eq 1 ]; then
cd $CUSTPATH
v "git pull"
git pull
cd - >/dev/null #go back
fi
fi
if [ ! -d "$FILEDIR" ]; then
mkdir -p $FILEDIR
elif [ -d "$FILEDIR" -a $CLEAN -eq 1 ]; then
v "rm -rf $FILEDIR*"
rm -rf $FILEDIR*
fi
if [ ! -d "$THEMEDIR" ]; then
mkdir -p $THEMEDIR
elif [ -d "$THEMEDIR" -a $CLEAN -eq 1 ]; then
v "rm -rf $THEMEDIR/*"
rm -rf $THEMEDIR/*
fi
}
create_and_copy_files()
{
local BOARDTYPE=$1
local CUSTOMER=$2
# Validate seleced board and customer
set_target $BOARDTYPE
if [ $target == "bogus" ]; then
echo "Hardware profile does not exist"
exit 1
elif [ -n "$CUSTOMER" -a ! -d "$CUSTCONF/$CUSTOMER/$BOARDTYPE/" ]; then
echo "Customer profile does not exist"
exit 1
fi
# Generate base config
# Used only for iopsys targets, not openwrt targets
rm -f .config
if [ $masterconfig -eq 1 ]; then
v "Config $BOARDTYPE selected"
v "cp $CONFIGPATH/config .config"
cp $CONFIGPATH/config .config
fi
# Apply profile diff to master config if selected
if [ -n "$PROFILE" ]; then
if [ -e "$CONFIGPATH/$PROFILE.diff" ]; then
cat $CONFIGPATH/$PROFILE.diff >> .config
elif [ "$PROFILE" == "juci" ]; then
v "Default profile (juci) is selected."
else
echo "ERROR: profile $PROFILE does not exist!"
exit 1
fi
else
v "No profile selected! Using default."
fi
# Set target and profile
echo "CONFIG_TARGET_${target}=y" >> .config
echo "CONFIG_TARGET_${target}_${BOARDTYPE}=y" >> .config
echo "$CUSTOMER $BOARDTYPE" > $CURRENT_CONFIG_FILE
# Add customerconfig diff if a customer is selected
if [ -n "$CUSTOMER" ]; then
if [ -d "$CUSTCONF/$CUSTOMER/common/fs" ]; then
v "cp -ar $CUSTCONF/$CUSTOMER/common/fs/* $FILEDIR"
cp -ar $CUSTCONF/$CUSTOMER/common/fs/* $FILEDIR
fi
if [ -d "$CUSTCONF/$CUSTOMER/$BOARDTYPE/fs" ]; then
v "cp -ar $CUSTCONF/$CUSTOMER/$BOARDTYPE/fs/* $FILEDIR"
cp -ar $CUSTCONF/$CUSTOMER/$BOARDTYPE/fs/* $FILEDIR
fi
if [ -d "$CUSTCONF/$CUSTOMER/juci-theme" ]; then
customer="$(echo $CUSTOMER | tr 'A-Z' 'a-z')"
v "cp -ar $CUSTCONF/$CUSTOMER/juci-theme $THEMEDIR/juci-theme-$customer"
cp -ar $CUSTCONF/$CUSTOMER/juci-theme $THEMEDIR/juci-theme-$customer
fi
if [ -e "$CUSTCONF/$CUSTOMER/common/common.diff" ]; then
v "Apply $CUSTCONF/$CUSTOMER/common/common.diff"
cat $CUSTCONF/$CUSTOMER/common/common.diff >> .config
fi
if [ -e "$CUSTCONF/$CUSTOMER/$BOARDTYPE/$BOARDTYPE.diff" ]; then
v "Apply $CUSTCONF/$CUSTOMER/$BOARDTYPE/$BOARDTYPE.diff"
cat $CUSTCONF/$CUSTOMER/$BOARDTYPE/$BOARDTYPE.diff >> .config
fi
fi
# Set target version
local GIT_TAG=$(git describe --abbrev=0 --tags)
echo "CONFIG_TARGET_VERSION=\"${GIT_TAG}\"" >> .config
# Enable Pckage source tree override if selected
[ $SRCTREEOVERR -eq 1 ] && echo CONFIG_SRC_TREE_OVERRIDE=y >> .config
# developer mode selected ?
if [ $DEVELOPER -eq 1 ]; then
# rewrite url to clone with ssh instead of http
echo "CONFIG_DEVEL=y" >>.config
echo "CONFIG_GITMIRROR_REWRITE=y" >>.config
[ $bcmAllowed -eq 0 ] && echo "CONFIG_BCM_OPEN=y" >> .config
[ $iceAllowed -eq 0 ] && echo "CONFIG_ICE_OPEN=y" >> .config
[ $endptAllowed -eq 0 ] && echo "CONFIG_ENDPT_OPEN=y" >> .config
[ $natalieAllowed -eq 0 ] && echo "CONFIG_NATALIE_OPEN=y" >> .config
else
echo "CONFIG_BCM_OPEN=y" >> .config
echo "CONFIG_ICE_OPEN=y" >> .config
echo "CONFIG_ENDPT_OPEN=y" >> .config
echo "CONFIG_NATALIE_OPEN=y" >> .config
fi
# Force regeneration of themes
touch package/feeds/feed_inteno_juci/juci/Makefile
# Force regeneration of kernel Makefile
# Needed to disable kmods for iopsys-brcm targets
touch package/kernel/linux/Makefile
# Set default values based on selected parameters
v "$(make defconfig 2>&1)"
# Temporary fixup for juci/luci profile
if [ "$PROFILE" == "luci" ]; then
sed -i '/CONFIG_DEFAULT_juci/d' .config
sed -i '/CONFIG_PACKAGE_juci/d' .config
sed -i '/CONFIG_PACKAGE_uhttpd/d' .config
fi
if [ $masterconfig -eq 1 ]; then
echo Set version to $(grep -w CONFIG_TARGET_VERSION .config | cut -d'=' -f2 | tr -d '"')
fi
# Clean base-file package to force rebuild when changing profile
v "$(make package/base-files/clean 2>&1)"
}
####### main #####
if [ ! -e tmp/.iop_bootstrap ]; then
echo "You have not installed feeds. Running genconfig in this state would create a non functional configuration."
echo "Run: iop feeds_update"
exit 0
fi
if [ ! -d "$FILEDIR" ]; then
mkdir $FILEDIR
elif [ -d "$FILEDIR" -a $CLEAN -eq 1 ]; then
v "rm -rf $FILEDIR*"
rm -rf $FILEDIR*
fi
}
create_and_copy_files()
{
local BOARDTYPE=$1
local CUSTOMER=$2
# Validate seleced board and customer
set_target $BOARDTYPE
if [ $target == "bogus" ]; then
echo "Hardware profile does not exist"
exit 1
elif [ -n "$CUSTOMER" -a ! -d "$CUSTCONF/$BOARDTYPE/$CUSTOMER/" ]; then
echo "Customer profile does not exist"
exit 1
fi
# Generate base config
# Used only for iopsys targets, not openwrt targets
rm -f .config
if [ $masterconfig -eq 1 ]; then
v "Config $BOARDTYPE selected"
v "cp $CONFIGPATH/config .config"
cp $CONFIGPATH/config .config
fi
# Apply profile diff to master config if selected
if [ -n "$PROFILE" ]; then
if [ -e "$CONFIGPATH/$PROFILE.diff" ]; then
cat $CONFIGPATH/$PROFILE.diff >> .config
elif [ "$PROFILE" == "juci" ]; then
v "Default profile (juci) is selected."
else
echo "ERROR: profile $PROFILE does not exist!"
exit 1
fi
else
v "No profile selected! Using default."
fi
# Set target and profile
echo "CONFIG_TARGET_${target}=y" >> .config
echo "CONFIG_TARGET_${target}_${BOARDTYPE}=y" >> .config
echo "$BOARDTYPE $CUSTOMER" > .current_config_file
# Add customerconfig diff if a customer is selected
if [ -n "$CUSTOMER" ]; then
if [ -d "$CUSTCONF/$BOARDTYPE/$CUSTOMER/fs" ]; then
v "cp -rLp $CUSTCONF/$BOARDTYPE/$CUSTOMER/fs/* $FILEDIR"
cp -rLp $CUSTCONF/$BOARDTYPE/$CUSTOMER/fs/* $FILEDIR
fi
if [ -e "$CUSTCONF/$BOARDTYPE/$CUSTOMER/$BOARDTYPE.diff" ]; then
v "Apply $CUSTCONF/$BOARDTYPE/$CUSTOMER/$BOARDTYPE.diff"
cat $CUSTCONF/$BOARDTYPE/$CUSTOMER/$BOARDTYPE.diff >> .config
fi
fi
# Set target version
local GIT_TAG=$(git describe --abbrev=0 --tags)
echo "CONFIG_TARGET_VERSION=\"${GIT_TAG}\"" >> .config
# Enable Pckage source tree override if selected
[ $SRCTREEOVERR -eq 1 ] && \
echo CONFIG_SRC_TREE_OVERRIDE=y >> .config
# developer mode selected ?
if [ $DEVELOPER -eq 1 ]; then
# rewrite url to clone with ssh instead of http
echo "CONFIG_DEVEL=y" >>.config
echo "CONFIG_GITMIRROR_REWRITE=y" >>.config
[ $bcmAllowed -eq 0 ] && echo "CONFIG_BCM_OPEN=y" >> .config
[ $iceAllowed -eq 0 ] && echo "CONFIG_ICE_OPEN=y" >> .config
[ $endptAllowed -eq 0 ] && echo "CONFIG_ENDPT_OPEN=y" >> .config
[ $natalieAllowed -eq 0 ] && echo "CONFIG_NATALIE_OPEN=y" >> .config
if [ $# -eq 0 ]; then
echo Current profile:
cat $CURRENT_CONFIG_FILE
echo "Try ./iop genconfig -h' to get instructions if you want to change current config"
exit 0
else
echo "CONFIG_BCM_OPEN=y" >> .config
echo "CONFIG_ICE_OPEN=y" >> .config
echo "CONFIG_ENDPT_OPEN=y" >> .config
echo "CONFIG_NATALIE_OPEN=y" >> .config
while [ -n "$1" ]; do
case "$1" in
-c|--clean) export CLEAN=1;;
-n|--no-update) export IMPORT=0;;
-v|--verbose) export VERBOSE="$(($VERBOSE + 1))";;
-p|--profile) export PROFILE="$2"; shift;;
-s|--override) export SRCTREEOVERR=1;;
-h|--help) usage;;
-l|--list) list_customers 0 $2;;
-a|--list-all)list_customers 1;;
-*)
echo "Invalid option: $1 "
echo "Try -h or --help for more information."
exit 1
;;
*) break;;
esac
shift;
done
setup_dirs
create_and_copy_files "$1" "$2"
if [ $masterconfig -eq 1 ]; then
use_local_mirror
fi
fi
# Force regeneration of kernel Makefile
# Needed to disable kmods for iopsys-brcm targets
touch package/kernel/linux/Makefile
# Set default values based on selected parameters
make defconfig
# Temporary fixup for juci/luci profile
if [ "$PROFILE" == "luci" ]; then
sed -i '/CONFIG_DEFAULT_juci/d' .config
sed -i '/CONFIG_PACKAGE_juci/d' .config
sed -i '/CONFIG_PACKAGE_uhttpd/d' .config
fi
if [ $masterconfig -eq 1 ]; then
echo Set version to $(grep -w CONFIG_TARGET_VERSION .config | cut -d'=' -f2 | tr -d '"')
fi
# Clean base-file package to force rebuild when changing profile
make package/base-files/clean
}
####### main #####
if [ ! -e tmp/.iop_bootstrap ]; then
echo "You have not installed feeds. Running genconfig in this state would create a non functional configuration."
echo "Run: iop feeds_update"
exit 0
fi
if [ $# -eq 0 ]; then
echo Current profile:
cat .current_config_file
echo "Try ./iop_get_config.sh -h' to get instructions if you want to change current config"
exit 0
else
while [ -n "$1" ]; do
case "$1" in
-c) export CLEAN=1;;
-u) export IMPORT=1;;
-v) export VERBOSE="$(($VERBOSE + 1))";;
-p) export PROFILE="$2"; shift;;
-t) export USE_TAG=1;;
-s) export SRCTREEOVERR=1;;
-h) usage;;
-*)
echo "Invalid option: $1 "
echo "Try -h' for more information."
exit 1
;;
*) break;;
esac
shift;
done
setup_dirs
create_and_copy_files "$1" "$2"
if [ $masterconfig -eq 1 ]; then
use_local_mirror
fi
fi
}
register_command "genconfig" "Generate configuration for board and customer"

View File

@@ -1,5 +1,6 @@
#!/bin/bash
UPDATE=0
print_git_update()
{
@@ -99,6 +100,28 @@ insert_hash_in_feed_makefile()
(cd ${PKG_DIR}; git add ${name})
}
insert_version_in_feed_makefile()
{
if [ -n "$PKG_SOURCE_VERSION_FILE" ]
then
name="$PKG_SOURCE_VERSION_FILE"
else
name=Makefile
fi
last_version=$(awk -F '=' '/PKG_VERSION:=/ {print $2}' ${PKG_DIR}/${name})
echo -n "please enter version: "
read -ei "$last_version" answer
if [ -z ${answer} ]; then
return
fi
sed -i -e "s/\(^PKG_VERSION:=\).*/\1${answer}/" ${PKG_DIR}/${name}
(cd ${PKG_DIR}; git add ${name})
}
# BUG: fix if only local branche name!
branch_uptodate()
@@ -400,6 +423,7 @@ check_packages()
# print_git_update
git_repos_uptodate
insert_hash_in_feed_makefile
[ "${UPDATE}" ] && insert_version_in_feed_makefile
create_message >tmp/msg
commit_feed tmp/msg
insert_hash_in_feeds_config
@@ -547,6 +571,13 @@ feeds_at_top()
exit 0
}
usage(){
echo -e "$0 [flags]"
echo -e "flags:"
echo -e " -v\tVerbose mode"
echo -e " -h\tShow this help"
echo -e " -u\tUpdate package version\n"
}
# Exported interface
function update_package {
@@ -563,15 +594,18 @@ function update_package {
Cyan='\033[0;36m' # Cyan
White='\033[0;37m' # White
while getopts "v:h" opt; do
while getopts "v:hu" opt; do
case $opt in
v)
verbose=$OPTARG
;;
h)
echo "some help! No options yet"
exit 1
;;
usage
exit 1
;;
u)
UPDATE=1
;;
\?)
echo "Invalid option: -$OPTARG" >&2
exit 1

View File

@@ -381,12 +381,14 @@ done
# Process IUP related DHCP options #
if [ -n "$1" ]; then
local privopt224 vendorspecinf httpurl128
local privopt224 privopt225 privopt226 vendorspecinf httpurl128
local tftp bootfile vlanid vlanpriority interface
json_load "$1"
json_get_var interface interface
json_get_var privopt224 privopt224
json_get_var privopt225 privopt225
json_get_var privopt226 privopt226
json_get_var vendorspecinf vendorspecinf
json_get_var httpurl128 httpurl128
json_get_var tftp tftp
@@ -422,6 +424,24 @@ if [ -n "$1" ]; then
elif [ -n "$vlanid" ]; then
logger -t dhcp_opt132 "vlanid: ${vlanid}"
change_to_vlan ${vlanid} 0 ${interface}
elif [ -n "$privopt225" ] || [ -n "$privopt226" ]; then
# opt225 and opt226 can be used together or separatly
if [ -n "$privopt225" ]; then
echo "dhcp option 225: $privopt225" >/dev/console
# option225 is allowd to change only once per CPE
if [ "$(uci get -q ice.cloud.frozen)" != "1" ] ; then
uci set ice.cloud.frozen="1"
uci set ice.cloud.enabled="1"
uci set ice.cloud.server="$privopt225"
fi
fi
if [ -n "$privopt226" ]; then
echo "dhcp option 226: $privopt226" >/dev/console
[ -z "$(uci get -q ice.dhcp)" ] && uci set ice.dhcp="dhcp"
uci set ice.dhcp.opt226connectionid="$privopt226"
ubus send dhcp.opt226connectionid '{"opt226connectionid":"","value":"'$privopt226'"}'
fi
uci commit
fi
exit 0

View File

@@ -85,6 +85,7 @@ wlmngr_doWlConf() {
#wlctl -i wl$idx nreqd $nreqd
wlconf wl$idx up
wlctl -i wl$idx obss_coex 1
}
wlmngr_setupMbssMacAddr() {
@@ -98,22 +99,6 @@ wlmngr_setupMbssMacAddr() {
done
}
#enableBSD() {
# nvram_set bsd_role=0
# [ act_wl_cnt == 0 ] && return FALSE
# for i in wl0 wl1; do
# if [ m_instance_wl[i].m_wlVar.wlEnbl == TRUE && m_instance_wl[i].m_wlVar.bsdRole > 0 ]; then
# nvram set bsd_role=m_instance_wl[i].m_wlVar.bsdRole
# nvram set bsd_pport=m_instance_wl[i].m_wlVar.bsdPport
# nvram set bsd_hpport=m_instance_wl[i].m_wlVar.bsdHport
# nvram set bsd_helper=m_instance_wl[i].m_wlVar.bsdHelper
# nvram set bsd_primary=m_instance_wl[i].m_wlVar.bsdPrimary
# return TRUE
# fi
# done
# return FALSE
#}
#enableSSD() {
# nvram set ssd_enable=0
# [ act_wl_cnt == 0 ] && return FALSE
@@ -169,6 +154,89 @@ wlmngr_startServices() {
# }
}
enableBSD() {
local wdev wdev_to_steer
local enabled policy
local rssi_threshold bw_util
nvram set bsd_role=0
nvram unset bsd_ifnames
enabled="$(uci -q get wireless.bandsteering.enabled)"
[ "$enabled" == "1" ] || return 1
policy="$(uci -q get wireless.bandsteering.policy)"
policy=${policy:-0}
rssi_threshold="$(uci -q get wireless.bandsteering.rssi_threshold)"
rssi_threshold=${rssi_threshold:--75}
bw_util="$(uci -q get wireless.bandsteering.bw_util)"
bw_util=${bw_util:--60}
nvram set bsd_role=3
nvram set bsd_pport=9878
nvram set bsd_hpport=9877
nvram set bsd_helper=192.168.1.2
nvram set bsd_primary=192.168.1.1
nvram set bsd_scheme=2
nvram set bsd_poll_interval=1
nvram set bsd_bounce_detect="180 8 3600"
nvram set bsd_msglevel=0
nvram set bsd_status_poll=5
nvram set bsd_status=3
for wdev in wl0 wl1; do
#if [ "$(uci -q get wireless.$wdev.band_steering)" == "1" ]; then
nvram set bsd_ifnames="$(nvram get bsd_ifnames) $wdev"
[ "$wdev" == "wl0" ] && wdev_to_steer="wl1" || wdev_to_steer="wl0"
if [ "$policy" == "0" ]; then
# RSSI Threshold based policy #
if [ "$(nvram get ${wdev}_nband)" == "2" ]; then
# 2.4G
nvram set ${wdev}_bsd_if_quality_policy="0 0x0 -100"
nvram set ${wdev}_bsd_if_select_policy=$wdev_to_steer
nvram set ${wdev}_bsd_sta_select_policy="10 0 0 0 1 1 0 0 0 0x400"
nvram set ${wdev}_bsd_steer_prefix=$wdev
nvram set ${wdev}_bsd_steering_policy="0 5 3 0 0 0x1"
else
# 5G
nvram set ${wdev}_bsd_if_quality_policy="20 0x0 $rssi_threshold"
nvram set ${wdev}_bsd_if_select_policy=$wdev_to_steer
nvram set ${wdev}_bsd_sta_select_policy="100 0 0 0 0 1 0 0 0 0x40"
nvram set ${wdev}_bsd_steer_prefix=$wdev
nvram set ${wdev}_bsd_steering_policy="80 5 3 $rssi_threshold 0 0x40"
fi
else
# Bandwidth Usage based policy #
if [ "$(nvram get ${wdev}_nband)" == "2" ]; then
# 2.4G
nvram set ${wdev}_bsd_if_quality_policy="0 0x0 -75"
nvram set ${wdev}_bsd_if_select_policy=$wdev_to_steer
nvram set ${wdev}_bsd_sta_select_policy="0 0 0 0 0 1 0 0 0 0x600"
nvram set ${wdev}_bsd_steer_prefix=$wdev
nvram set ${wdev}_bsd_steering_policy="0 5 3 0 0 0x10"
else
# 5G
nvram set ${wdev}_bsd_if_quality_policy="40 0x0 -75"
nvram set ${wdev}_bsd_if_select_policy=$wdev_to_steer
nvram set ${wdev}_bsd_sta_select_policy="0 0 0 0 0 1 0 0 0 0x240"
nvram set ${wdev}_bsd_steer_prefix=$wdev
nvram set ${wdev}_bsd_steering_policy="$bw_util 5 3 0 0 0x40"
fi
fi
#fi
done
return 0
}
wlmngr_BSDCtrl() {
killall -q -15 bsd 2>/dev/null
if $(enableBSD); then
bsd&
fi
}
wlmngr_startWsc()
{
local idx=$1
@@ -240,6 +308,20 @@ wlmngr_wlIfcUp() {
ifconfig $vif down
fi
done
case "$(uci -q get wireless.wl$idx.monitor)" in
1)
wlctl -i wl$idx monitor 1
ifconfig prism$idx up
;;
2)
wlctl -i wl$idx monitor 2
ifconfig radiotap$idx up
;;
*)
wlctl -i wl$idx monitor 0
;;
esac
}
wlmngr_doWds() {
@@ -272,6 +354,7 @@ wlmngr_finalize() {
# local isac="$(db get hw.$pcid.is_ac)"
# if [ "$isac" == "1" ]; then
# wlctl -i $device msglevel +radar +dfs
# #dhdctl -i $device dconpoll 200
# fi
local rdrthrs="$(db get hw.$pcid.radarthrs)"
if [ -n "$rdrthrs" ]; then

84
libtrace/Makefile Normal file
View File

@@ -0,0 +1,84 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=libtrace
PKG_VERSION:=3.0.22
PKG_RELEASE:=1
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/apietila/libtrace.git
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_VERSION:=HEAD
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
PKG_INSTALL:=1
PKG_FIXUP:=autoreconf
include $(INCLUDE_DIR)/uclibc++.mk
include $(INCLUDE_DIR)/package.mk
define Package/libtrace/Default
SECTION:=net
CATEGORY:=Network
TITLE:=Libtrace library for packet trace processing
URL:=http://research.wand.net.nz/software/libtrace.php
endef
define Package/libtrace
SECTION:=libs
CATEGORY:=Libraries
TITLE:=Libtrace library for packet trace processing
URL:=http://research.wand.net.nz/software/libtrace.php
DEPENDS:=+libpcap +libpthread +zlib +libbz2 +liblzo +librt $(CXX_DEPENDS)
endef
define Package/libtrace/description
Network trace processing library for trace processing. Supports multiple
input methods, including device capture, raw and gz-compressed
trace, and sockets.
endef
define Package/libtrace-tools
SECTION:=net
CATEGORY:=Network
TITLE:=Libtrace tools for packet trace processing
URL:=http://research.wand.net.nz/software/libtrace.php
DEPENDS:=+libncurses +libtrace
endef
define Package/libtrace-tools/description
Network trace processing tools for trace processing.
endef
CONFIGURE_ARGS += \
--with-bzip2 \
--with-zlib \
--with-lzo \
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/include
$(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libtrace.{a,so*} $(1)/usr/lib/
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libwandio.{a,so*} $(1)/usr/lib/
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libpacketdump.{a,so*} $(1)/usr/lib/
endef
define Package/libtrace/install
$(INSTALL_DIR) $(1)/usr/lib
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/libtrace.so.* $(1)/usr/lib/
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/libwandio.so.* $(1)/usr/lib/
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/libpacketdump.so.* $(1)/usr/lib/
$(INSTALL_DIR) $(1)/usr/lib/libpacketdump
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/libpacketdump/*.so* $(1)/usr/lib/libpacketdump/
endef
define Package/libtrace-tools/install
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/{traceanon,tracediff,traceends,tracepktdump,tracereplay,tracereport,tracertstats,tracesplit,tracestats} $(1)/usr/bin/
endef
$(eval $(call BuildPackage,libtrace))
$(eval $(call BuildPackage,libtrace-tools))

47
logrotate/Makefile Normal file
View File

@@ -0,0 +1,47 @@
#
# Copyright (C) 2006 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
# $Id$
include $(TOPDIR)/rules.mk
PKG_NAME:=logrotate
PKG_VERSION:=3.7.1
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).orig.tar.gz
PKG_SOURCE_URL:=http://ftp.de.debian.org/debian/pool/main/l/logrotate
PKG_MD5SUM:=552639142e163745f6bcd4f1f3816d8a
PKG_CAT:=zcat
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
include $(INCLUDE_DIR)/package.mk
define Package/logrotate
SECTION:=utils
CATEGORY:=Utilities
DEPENDS:=+libpopt
TITLE:=rotates, compresses, and mails system logs
endef
define Build/Compile
$(call Build/Compile/Default, \
RPM_OPT_FLAGS="$(TARGET_CFLAGS) $(EXTRA_CPPFLAGS)" \
LDFLAGS="$(EXTRA_LDFLAGS)" \
logrotate \
)
endef
define Package/logrotate/install
$(INSTALL_DIR) $(1)/usr/sbin
$(CP) ${PKG_BUILD_DIR}/logrotate $(1)/usr/sbin/
$(INSTALL_DIR) $(1)/etc
$(CP) ./files/logrotate.conf $(1)/etc/
$(INSTALL_DIR) $(1)/etc/logrotate.d
endef
$(eval $(call BuildPackage,logrotate))

View File

@@ -0,0 +1,30 @@
# rotate log files weekly
weekly
#daily
# keep 4 weeks worth of backlogs
rotate 4
# create new (empty) log files after rotating old ones
create
notifempty
nomail
#olddir /var/log/backup/
missingok
#dateext
# uncomment this if you want your log files compressed
#compress
# packages can drop log rotation information into this directory
include /etc/logrotate.d
# no packages own lastlog or wtmp -- we'll rotate them here
#/var/log/wtmp {
# monthly
# create 0664 root utmp
# rotate 1
#}
# system-specific logs may be also be configured here.

View File

@@ -0,0 +1,433 @@
diff -u -ruN logrotate-3.7.1.orig/config.c logrotate-3.7.1/config.c
--- logrotate-3.7.1.orig/config.c 2003-08-07 07:13:14.000000000 -0400
+++ logrotate-3.7.1/config.c 2005-05-24 12:21:09.000000000 -0400
@@ -511,6 +511,14 @@
newlog->flags &= ~LOG_FLAG_IFEMPTY;
*endtag = oldchar, start = endtag;
+ } else if (!strcmp(start, "dateext")) {
+ newlog->flags |= LOG_FLAG_DATEEXT;
+
+ *endtag = oldchar, start = endtag;
+ } else if (!strcmp(start, "nodateext")) {
+ newlog->flags &= ~LOG_FLAG_DATEEXT;
+
+ *endtag = oldchar, start = endtag;
} else if (!strcmp(start, "noolddir")) {
newlog->oldDir = NULL;
@@ -670,6 +678,21 @@
}
*endtag = oldchar, start = endtag;
}
+ } else if (!strcmp(start, "maxage")) {
+ *endtag = oldchar, start = endtag;
+
+ if (!isolateValue(configFile, lineNum, "maxage count", &start,
+ &endtag)) {
+ oldchar = *endtag, *endtag = '\0';
+
+ newlog->rotateAge = strtoul(start, &chptr, 0);
+ if (*chptr || newlog->rotateAge < 0) {
+ message(MESS_ERROR, "%s:%d bad maximum age '%s'\n",
+ configFile, lineNum, start);
+ return 1;
+ }
+ *endtag = oldchar, start = endtag;
+ }
} else if (!strcmp(start, "errors")) {
message(MESS_DEBUG, "%s: %d: the errors directive is deprecated and no longer used.\n",
configFile, lineNum);
diff -u -ruN logrotate-3.7.1.orig/logrotate.8 logrotate-3.7.1/logrotate.8
--- logrotate-3.7.1.orig/logrotate.8 2003-08-07 07:13:14.000000000 -0400
+++ logrotate-3.7.1/logrotate.8 2005-05-24 12:21:09.000000000 -0400
@@ -200,6 +200,11 @@
Log files are rotated every day.
.TP
+\fBdateext\fR
+Archive old versions of log files adding a daily extension like YYYYMMDD
+instead of simply adding a number.
+
+.TP
\fBdelaycompress\fR
Postpone compression of the previous log file to the next rotation cycle.
This has only effect when used in combination with \fBcompress\fR.
@@ -246,6 +251,12 @@
instead of the just-rotated file (this is the default).
.TP
+\fBmaxage\fR \fIcount\fR
+Remove rotated logs older than <count> days. The age is only checked
+if the logfile is to be rotated. The files are mailed to the
+configured address if \fBmaillast\fR and \fBmail\fR are configured.
+
+.TP
\fBmissingok\fR
If the log file is missing, go on to the next one without issuing an error
message. See also \fBnomissingok\fR.
diff -u -ruN logrotate-3.7.1.orig/logrotate.c logrotate-3.7.1/logrotate.c
--- logrotate-3.7.1.orig/logrotate.c 2004-10-19 17:41:24.000000000 -0400
+++ logrotate-3.7.1/logrotate.c 2005-05-24 12:21:09.000000000 -0400
@@ -11,6 +11,7 @@
#include <sys/wait.h>
#include <time.h>
#include <unistd.h>
+#include <glob.h>
#ifdef WITH_SELINUX
#include <selinux/selinux.h>
@@ -22,6 +23,10 @@
#include "log.h"
#include "logrotate.h"
+#if !defined(GLOB_ABORTED) && defined(GLOB_ABEND)
+#define GLOB_ABORTED GLOB_ABEND
+#endif
+
typedef struct {
char * fn;
struct tm lastRotated; /* only tm.mon, tm_mday, tm_year are good! */
@@ -42,6 +47,14 @@
char * mailCommand = DEFAULT_MAIL_COMMAND;
time_t nowSecs = 0;
+static int globerr(const char * pathname, int theerr) {
+ message(MESS_ERROR, "error accessing %s: %s\n", pathname,
+ strerror(theerr));
+
+ /* We want the glob operation to continue, so return 0 */
+ return 1;
+}
+
static logState * findState(const char * fn, struct stateSet * sip) {
int i;
logState * states = sip->states;
@@ -49,9 +62,11 @@
struct tm now = *localtime(&nowSecs);
time_t lr_time;
+ /* find the filename fn in the statesPtr list */
for (i = 0; i < numStates; i++)
if (!strcmp(fn, states[i].fn)) break;
+ /* not in statesPtr list, so add new entry */
if (i == numStates) {
i = numStates++;
states = realloc(states, sizeof(*states) * numStates);
@@ -121,6 +136,17 @@
return rc;
}
+static int removeLogFile(char * name) {
+ message(MESS_DEBUG, "removing old log %s\n", name);
+
+ if (!debug && unlink(name)) {
+ message(MESS_ERROR, "Failed to remove old log %s: %s\n",
+ name, strerror(errno));
+ return 1;
+ }
+ return 0;
+}
+
static int compressLogFile(char * name, logInfo * log, struct stat *sb) {
char * compressedName;
const char ** fullCommand;
@@ -265,6 +291,25 @@
return rc;
}
+static int mailLogWrapper (char * mailFilename, char * mailCommand, int logNum, logInfo * log) {
+ /* if the log is compressed (and we're not mailing a
+ * file whose compression has been delayed), we need
+ * to uncompress it */
+ if ((log->flags & LOG_FLAG_COMPRESS) &&
+ !((log->flags & LOG_FLAG_DELAYCOMPRESS) &&
+ (log->flags & LOG_FLAG_MAILFIRST))) {
+ if (mailLog(mailFilename, mailCommand,
+ log->uncompress_prog, log->logAddress,
+ log->files[logNum]))
+ return 1;
+ } else {
+ if (mailLog(mailFilename, mailCommand, NULL,
+ log->logAddress, mailFilename))
+ return 1;
+ }
+ return 0;
+}
+
static int copyTruncate(char * currLog, char * saveLog, struct stat * sb, int flags) {
char buf[BUFSIZ];
int fdcurr = -1, fdsave = -1;
@@ -479,6 +524,9 @@
char * baseName;
char * dirName;
char * firstRotated;
+ char * glob_pattern;
+ glob_t globResult;
+ int rc;
size_t alloc_size;
int rotateCount = log->rotateCount ? log->rotateCount : 1;
int logStart = (log->logStart == -1) ? 1 : log->logStart;
@@ -509,7 +557,7 @@
alloc_size = strlen(dirName) + strlen(baseName) +
strlen(log->files[logNum]) + strlen(fileext) +
- strlen(compext) + 10;
+ strlen(compext) + 18;
oldName = alloca(alloc_size);
newName = alloca(alloc_size);
@@ -531,16 +579,116 @@
/* First compress the previous log when necessary */
if (log->flags & LOG_FLAG_COMPRESS &&
log->flags & LOG_FLAG_DELAYCOMPRESS) {
- struct stat sbprev;
-
- sprintf(oldName, "%s/%s.%d%s", dirName, baseName, logStart, fileext);
- if (stat(oldName, &sbprev)) {
- message(MESS_DEBUG, "previous log %s does not exist\n",
- oldName);
- } else {
- hasErrors = compressLogFile(oldName, log, &sbprev);
+ if (log->flags & LOG_FLAG_DATEEXT) {
+ /* glob for uncompressed files with our pattern */
+ glob_pattern = malloc(strlen(dirName) + strlen(baseName)
+ + strlen(fileext) + 44 );
+ sprintf(glob_pattern,
+ "%s/%s-[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]%s",
+ dirName, baseName, fileext);
+ rc = glob(glob_pattern, 0, globerr, &globResult);
+ if (!rc && globResult.gl_pathc > 0) {
+ for (i = 0; i < globResult.gl_pathc && !hasErrors; i++) {
+ struct stat sbprev;
+ sprintf(oldName,"%s",(globResult.gl_pathv)[i]);
+ if (stat(oldName, &sbprev)) {
+ message(MESS_DEBUG, "previous log %s does not exist\n", oldName);
+ } else {
+ hasErrors = compressLogFile(oldName, log, &sbprev);
+ }
+ }
+ } else {
+ message (MESS_DEBUG, "glob finding logs to compress failed\n");
+ /* fallback to old behaviour */
+ sprintf(oldName, "%s/%s.%d%s", dirName, baseName, logStart, fileext);
+ }
+ globfree(&globResult);
+ free(glob_pattern);
+ } else {
+ struct stat sbprev;
+
+ sprintf(oldName, "%s/%s.%d%s", dirName, baseName, logStart, fileext);
+ if (stat(oldName, &sbprev)) {
+ message(MESS_DEBUG, "previous log %s does not exist\n",
+ oldName);
+ } else {
+ hasErrors = compressLogFile(oldName, log, &sbprev);
+ }
}
}
+
+ firstRotated = alloca(strlen(dirName) + strlen(baseName) +
+ strlen(fileext) + strlen(compext) + 30);
+
+ if(log->flags & LOG_FLAG_DATEEXT) {
+ /* glob for compressed files with our pattern
+ * and compress ext */
+ glob_pattern = malloc(strlen(dirName)+strlen(baseName)
+ +strlen(fileext)+strlen(compext)+44);
+ sprintf(glob_pattern,
+ "%s/%s-[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]%s%s",
+ dirName, baseName, fileext, compext);
+ rc = glob(glob_pattern, 0, globerr, &globResult);
+ if (!rc) {
+ /* search for files to drop, if we find one remember it,
+ * if we find another one mail and remove the first and
+ * remember the second and so on */
+ struct stat fst_buf;
+ int mail_out = -1;
+ /* remove the first (n - rotateCount) matches
+ * no real rotation needed, since the files have
+ * the date in their name */
+ for (i = 0; i < globResult.gl_pathc; i++) {
+ if( !stat((globResult.gl_pathv)[i],&fst_buf) ) {
+ if ((i <= ((int)globResult.gl_pathc - rotateCount))
+ || ((log->rotateAge > 0)
+ && (((nowSecs - fst_buf.st_mtime)/60/60/24)
+ > log->rotateAge))) {
+ if ( mail_out != -1 ) {
+ if (!hasErrors && log->logAddress) {
+ char * mailFilename = (globResult.gl_pathv)[mail_out];
+ hasErrors = mailLogWrapper(mailFilename, mailCommand, logNum, log);
+ if (!hasErrors)
+ hasErrors = removeLogFile(mailFilename);
+ }
+ }
+ mail_out = i;
+ }
+ }
+ }
+ if ( mail_out != -1 ) {
+ /* oldName is oldest Backup found (for unlink later) */
+ sprintf(oldName, "%s", (globResult.gl_pathv)[mail_out]);
+ strcpy(disposeName, oldName);
+ } else
+ disposeName = NULL;
+ } else {
+ message (MESS_DEBUG, "glob finding old rotated logs failed\n");
+ disposeName = NULL;
+ }
+ /* firstRotated is most recently created/compressed rotated log */
+ sprintf(firstRotated, "%s/%s-%04d%02d%02d%s%s",
+ dirName, baseName, now.tm_year+1900,
+ now.tm_mon+1, now.tm_mday, fileext, compext);
+ globfree(&globResult);
+ free(glob_pattern);
+ } else {
+ if ( log->rotateAge ) {
+ struct stat fst_buf;
+ for (i=1; i <= rotateCount; i++) {
+ sprintf(oldName, "%s/%s.%d%s%s", dirName, baseName,
+ rotateCount + 1, fileext, compext);
+ if(!stat(oldName,&fst_buf)
+ && (((nowSecs - fst_buf.st_mtime)/60/60/24)
+ > log->rotateAge)) {
+ char * mailFilename = (globResult.gl_pathv)[i];
+ if (!hasErrors && log->logAddress)
+ hasErrors = mailLogWrapper(mailFilename, mailCommand, logNum, log);
+ if (!hasErrors)
+ hasErrors = removeLogFile(mailFilename);
+ }
+ }
+ }
sprintf(oldName, "%s/%s.%d%s%s", dirName, baseName,
logStart + rotateCount, fileext, compext);
@@ -548,8 +696,6 @@
strcpy(disposeName, oldName);
- firstRotated = alloca(strlen(dirName) + strlen(baseName) +
- strlen(fileext) + strlen(compext) + 30);
sprintf(firstRotated, "%s/%s.%d%s%s", dirName, baseName,
logStart, fileext,
(log->flags & LOG_FLAG_DELAYCOMPRESS) ? "" : compext);
@@ -600,12 +746,27 @@
}
}
}
-
+ } /* !LOG_FLAG_DATEEXT */
+
finalName = oldName;
-
- /* note: the gzip extension is *not* used here! */
- sprintf(finalName, "%s/%s.%d%s", dirName, baseName, logStart, fileext);
-
+
+ if(log->flags & LOG_FLAG_DATEEXT) {
+ char * destFile = alloca(strlen(dirName) + strlen(baseName) +
+ strlen(fileext) + strlen(compext) + 30);
+ struct stat fst_buf;
+ sprintf(finalName, "%s/%s-%04d%02d%02d%s",
+ dirName, baseName, now.tm_year+1900,
+ now.tm_mon+1, now.tm_mday, fileext);
+ sprintf(destFile, "%s%s", finalName, compext);
+ if(!stat(destFile,&fst_buf)) {
+ message (MESS_DEBUG, "destination %s already exists, skipping rotation\n", firstRotated);
+ hasErrors = 1;
+ }
+ } else {
+ /* note: the gzip extension is *not* used here! */
+ sprintf(finalName, "%s/%s.%d%s", dirName, baseName, logStart, fileext);
+ }
+
/* if the last rotation doesn't exist, that's okay */
if (!debug && access(disposeName, F_OK)) {
message(MESS_DEBUG, "log %s doesn't exist -- won't try to "
@@ -613,9 +774,6 @@
disposeName = NULL;
}
- free(dirName);
- free(baseName);
-
if (!hasErrors) {
if (log->pre && !(log->flags & LOG_FLAG_SHAREDSCRIPTS)) {
message(MESS_DEBUG, "running prerotate script\n");
@@ -722,33 +880,12 @@
else
mailFilename = disposeName;
- if (mailFilename) {
- /* if the log is compressed (and we're not mailing a
- file whose compression has been delayed), we need
- to uncompress it */
- if ((log->flags & LOG_FLAG_COMPRESS) &&
- !((log->flags & LOG_FLAG_DELAYCOMPRESS) &&
- (log->flags & LOG_FLAG_MAILFIRST))) {
- if (mailLog(mailFilename, mailCommand,
- log->uncompress_prog, log->logAddress,
- log->files[logNum]))
- hasErrors = 1;
- } else {
- if (mailLog(mailFilename, mailCommand, NULL,
- log->logAddress, mailFilename))
- hasErrors = 1;
- }
- }
+ if (mailFilename)
+ hasErrors = mailLogWrapper(mailFilename, mailCommand, logNum, log);
}
if (!hasErrors && disposeName) {
- message(MESS_DEBUG, "removing old log %s\n", disposeName);
-
- if (!debug && unlink(disposeName)) {
- message(MESS_ERROR, "Failed to remove old log %s: %s\n",
- disposeName, strerror(errno));
- hasErrors = 1;
- }
+ hasErrors = removeLogFile(disposeName);
}
}
@@ -761,6 +898,8 @@
}
}
#endif
+ free(dirName);
+ free(baseName);
return hasErrors;
}
@@ -1047,7 +1186,9 @@
int main(int argc, const char ** argv) {
logInfo defConfig = { NULL, NULL, 0, NULL, ROT_SIZE,
- /* threshHold */ 1024 * 1024, 0,
+ /* threshHold */ 1024 * 1024,
+ /* rotateCount */ 0,
+ /* rotateAge */ 0,
/* log start */ -1,
/* pre, post */ NULL, NULL,
/* first, last */ NULL, NULL,
diff -u -ruN logrotate-3.7.1.orig/logrotate.h logrotate-3.7.1/logrotate.h
--- logrotate-3.7.1.orig/logrotate.h 2003-08-07 07:13:14.000000000 -0400
+++ logrotate-3.7.1/logrotate.h 2005-05-24 12:21:09.000000000 -0400
@@ -15,6 +15,7 @@
#define LOG_FLAG_MAILFIRST (1 << 6)
#define LOG_FLAG_SHAREDSCRIPTS (1 << 7)
#define LOG_FLAG_COPY (1 << 8)
+#define LOG_FLAG_DATEEXT (1 << 9)
#define NO_FORCE_ROTATE 0
#define FORCE_ROTATE 1
@@ -34,6 +35,7 @@
enum { ROT_DAYS, ROT_WEEKLY, ROT_MONTHLY, ROT_SIZE, ROT_FORCE } criterium;
unsigned int threshhold;
int rotateCount;
+ int rotateAge;
int logStart;
char * pre, * post, * first, * last;
char * logAddress;

View File

@@ -0,0 +1,12 @@
diff -u -ruN logrotate-3.7.1.orig/logrotate.c logrotate-3.7.1/logrotate.c
--- logrotate-3.7.1.orig/logrotate.c 2004-10-19 17:41:24.000000000 -0400
+++ logrotate-3.7.1/logrotate.c 2005-05-24 12:12:26.000000000 -0400
@@ -1002,7 +1002,7 @@
}
/* Hack to hide earlier bug */
- if ((year != 1900) && (year < 1996 || year > 2100)) {
+ if ((year != 1900) && (year < 1970 || year > 2100)) {
message(MESS_ERROR, "bad year %d for file %s in state file %s\n",
year, argv[0], stateFilename);
fclose(f);

View File

@@ -0,0 +1,14 @@
--- logrotate-3.7/config.c.orig 2005-04-26 22:57:53.000000000 -0400
+++ logrotate-3.7/config.c 2005-04-26 22:59:36.000000000 -0400
@@ -142,6 +142,11 @@
(!fname[1] || (fname[1] == '.' && !fname[2])))
return 0;
+ /* Don't include 'hidden' files either; this breaks Gentoo
+ portage config file management http://bugs.gentoo.org/87683 */
+ if (fname[0] == '.')
+ return 0;
+
/* Check if fname is ending in a taboo-extension; if so, return
false */
for (i = 0; i < tabooCount; i++) {

View File

@@ -0,0 +1,54 @@
diff -u -ruN logrotate-3.7.1-cur/logrotate.c logrotate-3.7.1/logrotate.c
--- logrotate-3.7.1-cur/logrotate.c 2005-05-25 18:20:41.000000000 -0400
+++ logrotate-3.7.1/logrotate.c 2005-05-25 18:21:10.000000000 -0400
@@ -90,10 +90,7 @@
}
static int runScript(char * logfn, char * script) {
- int fd;
- char *filespec;
int rc;
- char buf[256];
if (debug) {
message(MESS_DEBUG, "running script with arg %s: \"%s\"\n",
@@ -101,38 +98,12 @@
return 0;
}
- filespec = buf;
- snprintf(buf, sizeof(buf), "%s/logrotate.XXXXXX", getenv("TMPDIR") ?: "/tmp");
- fd = -1;
- if (!filespec || (fd = mkstemp(filespec)) < 0 || fchmod(fd, 0700)) {
- message(MESS_DEBUG, "error creating %s: %s\n", filespec,
- strerror(errno));
- if (fd >= 0) {
- close(fd);
- unlink(filespec);
- }
- return -1;
- }
-
- if (write(fd, "#!/bin/sh\n\n", 11) != 11 ||
- write(fd, script, strlen(script)) != strlen(script)) {
- message(MESS_DEBUG, "error writing %s\n", filespec);
- close(fd);
- unlink(filespec);
- return -1;
- }
-
- close(fd);
-
if (!fork()) {
- execlp(filespec, filespec, logfn, NULL);
+ execl("/bin/sh", "sh", "-c", script, NULL);
exit(1);
}
wait(&rc);
-
- unlink(filespec);
-
return rc;
}

View File

@@ -0,0 +1,12 @@
diff -u -ruN logrotate-3.7.1.orig/config.c logrotate-3.7.1/config.c
--- logrotate-3.7.1.orig/config.c 2003-08-07 07:13:14.000000000 -0400
+++ logrotate-3.7.1/config.c 2005-05-24 12:13:41.000000000 -0400
@@ -147,7 +147,7 @@
for (i = 0; i < tabooCount; i++) {
if (!strcmp(fname + strlen(fname) - strlen(tabooExts[i]),
tabooExts[i])) {
- message(MESS_ERROR, "Ignoring %s, because of %s "
+ message(MESS_DEBUG, "Ignoring %s, because of %s "
"ending\n", fname, tabooExts[i]);
return 0;

View File

@@ -0,0 +1,22 @@
--- logrotate-3.7.1-old/logrotate.c 2004-10-19 23:41:24.000000000 +0200
+++ logrotate-3.7.1-new/logrotate.c 2005-10-02 17:29:22.380767321 +0200
@@ -424,12 +424,15 @@ int findNeedRotating(logInfo * log, int
switch (log->criterium) {
case ROT_WEEKLY:
/* rotate if:
- 1) the current weekday is before the weekday of the
- last rotation
+ 1) the day of the week is the same as the day of the week of
+ the previous rotation but not the same day of the year
+ this will rotate it on the same day every week, but not
+ twice a day.
2) more then a week has passed since the last
rotation */
- state->doRotate = ((now.tm_wday < state->lastRotated.tm_wday) ||
- ((mktime(&now) - mktime(&state->lastRotated)) >
+ state->doRotate = ((now.tm_wday == state->lastRotated.tm_wday &&
+ now.tm_yday != state->lastRotated.tm_yday) ||
+ ((mktime(&now) - mktime(&state->lastRotated)) >
(7 * 24 * 3600)));
break;
case ROT_MONTHLY:

View File

@@ -27,9 +27,9 @@ failover() {
add() {
wan_fail_map=$(echo $wan_fail_map | sed -e "s/${1}\[${failchk}\]//g")
wan_fail_map=$(echo $wan_fail_map | sed -e "s/\(^\|.*\]\)${1}\[${failchk}\]/\1/g")
wan_fail_map="$wan_fail_map${1}[x]"
wan_recovery_map=$(echo $wan_recovery_map | sed -e "s/${1}\[${recvrychk}\]//g")
wan_recovery_map=$(echo $wan_recovery_map | sed -e "s/\(^\|.*\]\)${1}\[${recvrychk}\]/\1/g")
update_cache
if [ "$existing_failover" == "2" ]; then
@@ -46,8 +46,8 @@ failover() {
del() {
wan_recovery_map=$(echo $wan_recovery_map | sed -e "s/${1}\[${recvrychk}\]//g")
wan_fail_map=$(echo $wan_fail_map | sed -e "s/${1}\[${failchk}\]//g")
wan_recovery_map=$(echo $wan_recovery_map | sed -e "s/\(^\|.*\]\)${1}\[${recvrychk}\]/\1/g")
wan_fail_map=$(echo $wan_fail_map | sed -e "s/\(^\|.*\]\)${1}\[${failchk}\]/\1/g")
update_cache
if [ "$existing_failover" == "3" ]; then
@@ -70,7 +70,7 @@ fail_wan() {
local failchk=$(query_config failchk $1)
local recvrychk=$(query_config recvrychk $1)
wan_recovery_map=$(echo $wan_recovery_map | sed -e "s/${1}\[${recvrychk}\]//g")
wan_recovery_map=$(echo $wan_recovery_map | sed -e "s/\(^\|.*\]\)${1}\[${recvrychk}\]/\1/g")
if [ -z "$failchk" ]; then
failchk=1
@@ -80,7 +80,7 @@ fail_wan() {
if [ "$failchk" != "x" ]; then
new_fail_count=$(($failchk + 1))
if [ "$new_fail_count" -lt "$health_fail_retries" ]; then
wan_fail_map=$(echo $wan_fail_map | sed -e "s/${1}\[${failchk}\]/$1\[${new_fail_count}\]/g")
wan_fail_map=$(echo $wan_fail_map | sed -e "s/\(^\|.*\]\)${1}\[${failchk}\]/\1${1}\[${new_fail_count}\]/g")
else
failover add $1
refresh_dns
@@ -103,7 +103,7 @@ recover_wan() {
local wanid=$(query_config wanid $1)
if [ ! -z "$failchk" -a "$failchk" != "x" ]; then
wan_fail_map=$(echo $wan_fail_map | sed -e "s/${1}\[${failchk}\]//g")
wan_fail_map=$(echo $wan_fail_map | sed -e "s/\(^\|.*\]\)${1}\[${failchk}\]/\1/g")
update_cache
fi
@@ -117,7 +117,7 @@ recover_wan() {
else
new_recovery_count=$(($recvrychk + 1))
if [ "$new_recovery_count" -lt "$health_recovery_retries" ]; then
wan_recovery_map=$(echo $wan_recovery_map | sed -e "s/${1}\[${recvrychk}\]/$1\[${new_recovery_count}\]/g")
wan_recovery_map=$(echo $wan_recovery_map | sed -e "s/\(^\|.*\]\)${1}\[${recvrychk}\]/\1${1}\[${new_recovery_count}\]/g")
update_cache
else
failover del $1
@@ -138,11 +138,12 @@ acquire_wan_data() {
local old_gateway
local ifname ipaddr gateway
network_flush_cache
network_get_device ifname ${1} || ifname=x
network_get_ipaddr ipaddr ${1} || ipaddr=x
network_get_gateway gateway ${1} || gateway=x
check_old_map=$(echo $wan_id_map 2>&1 | grep -o "$1\[")
check_old_map=$(echo $wan_id_map 2>&1 | grep -o -e "^$1\[" -e "\]$1\[")
if [ -z $check_old_map ]; then
wancount=$(($wancount + 1))
@@ -160,9 +161,9 @@ acquire_wan_data() {
old_ifname=$(query_config ifname $1)
get_wanid=$(query_config wanid $1)
wan_if_map=$(echo $wan_if_map | sed -e "s/${1}\[${old_ifname}\]/$1\[${ifname}\]/g")
wan_ip_map=$(echo $wan_ip_map | sed -e "s/${1}\[${old_ipaddr}\]/$1\[${ipaddr}\]/g")
wan_gw_map=$(echo $wan_gw_map | sed -e "s/${1}\[${old_gateway}\]/$1\[${gateway}\]/g")
wan_if_map=$(echo $wan_if_map | sed -e "s/\(^\|.*\]\)${1}\[${old_ifname}\]/\1${1}\[${ifname}\]/g")
wan_ip_map=$(echo $wan_ip_map | sed -e "s/\(^\|.*\]\)${1}\[${old_ipaddr}\]/\1${1}\[${ipaddr}\]/g")
wan_gw_map=$(echo $wan_gw_map | sed -e "s/\(^\|.*\]\)${1}\[${old_gateway}\]/\1${1}\[${gateway}\]/g")
if [ "$old_ifname" != "$ifname" ]; then
iptables -D MultiWanPreHandler -t mangle -i $old_$ifname -m state --state NEW -j FW${get_wanid}MARK
@@ -205,14 +206,14 @@ update_cache() {
query_config() {
case $1 in
ifname) echo $wan_if_map | grep -o "$2\[\w*.*\]" | awk -F "[" '{print $2}' | awk -F "]" '{print $1}';;
ipaddr) echo $wan_ip_map | grep -o "$2\[\w*.*\]" | awk -F "[" '{print $2}' | awk -F "]" '{print $1}';;
gateway) echo $wan_gw_map | grep -o "$2\[\w*.*\]" | awk -F "[" '{print $2}' | awk -F "]" '{print $1}';;
wanid) echo $wan_id_map | grep -o "$2\[\w*.*\]" | awk -F "[" '{print $2}' | awk -F "]" '{print $1}';;
failchk) echo $wan_fail_map | grep -o "$2\[\w*.*\]" | awk -F "[" '{print $2}' | awk -F "]" '{print $1}';;
recvrychk) echo $wan_recovery_map | grep -o "$2\[\w*.*\]" | awk -F "[" '{print $2}' | awk -F "]" '{print $1}';;
monitor) echo $wan_monitor_map | grep -o "$2\[\w*.*\]" | awk -F "[" '{print $2}' | awk -F "]" '{print $1}';;
group) echo $wan_id_map | grep -o "\w*\[$2\]" | awk -F "[" '{print $1}';;
ifname) echo $wan_if_map | grep -o -e "^$2\[\w*.*\]" -e "\]$2\[\w*.*\]" | awk -F "[" '{print $2}' | awk -F "]" '{print $1}';;
ipaddr) echo $wan_ip_map | grep -o -e "^$2\[\w*.*\]" -e "\]$2\[\w*.*\]" | awk -F "[" '{print $2}' | awk -F "]" '{print $1}';;
gateway) echo $wan_gw_map | grep -o -e "^$2\[\w*.*\]" -e "\]$2\[\w*.*\]" | awk -F "[" '{print $2}' | awk -F "]" '{print $1}';;
wanid) echo $wan_id_map | grep -o -e "^$2\[\w*.*\]" -e "\]$2\[\w*.*\]" | awk -F "[" '{print $2}' | awk -F "]" '{print $1}';;
failchk) echo $wan_fail_map | grep -o -e "^$2\[\w*.*\]" -e "\]$2\[\w*.*\]" | awk -F "[" '{print $2}' | awk -F "]" '{print $1}';;
recvrychk) echo $wan_recovery_map | grep -o -e "^$2\[\w*.*\]" -e "\]$2\[\w*.*\]" | awk -F "[" '{print $2}' | awk -F "]" '{print $1}';;
monitor) echo $wan_monitor_map | grep -o -e "^$2\[\w*.*\]" -e "\]$2\[\w*.*\]" | awk -F "[" '{print $2}' | awk -F "]" '{print $1}';;
group) echo $wan_id_map | grep -o "\w*\[$2\]" | awk -F "[" '{print $1}';;
esac
}
@@ -435,6 +436,34 @@ mwanrule() {
add_rule
}
get_dns_servers() {
local group=$1
local groups=$1
local dns=""
local dnss=""
local aliases=""
local g
aliases="$(uci show network| grep =\'@$group\')"
for g in $aliases ; do
g=${g#*.}; g=${g%%.*}
[ "$(uci -q get network.$g)" == "interface" ] || continue
groups="$groups $g"
done
groups="$(echo $groups | tr ' ' '\n' | sort -u | tr '\n' ' ')"
for group in $groups ; do
network_get_dnsserver dns ${group}
dnss="$dnss $dns"
done
echo $dnss
}
refresh_dns() {
local dns
local group
@@ -445,6 +474,8 @@ refresh_dns() {
local compile_dns
local dns_server
network_flush_cache
iptables -F MultiWanDNS -t mangle
rm /tmp/resolv.conf.auto
@@ -461,8 +492,8 @@ refresh_dns() {
failchk=$(query_config failchk $group)
dns=$(uci_get_state multiwan ${group} dns 'auto')
[ "$dns" == "auto" ] && network_get_dnsserver dns ${group}
dns=$(echo $dns | sed -e "s/ /\n/g")
[ "$dns" == "auto" ] && dns=$(get_dns_servers $group)
dns=$(echo $dns | sed -e "s/\,/ /g" | sed -e "s/ /\n/g")
if [ ! -z "$dns" -a "$failchk" != "x" -a "$ipaddr" != "x" -a "$gateway" != "x" -a "$ifname" != "x" ]; then
echo "$dns" | while read dns_server; do
@@ -822,6 +853,7 @@ monitor_wan() {
while :; do
[ "${health_monitor%.*}" = 'parallel' ] && sleep $health_interval
network_flush_cache
network_get_device ifname ${1} || ifname=x
network_get_ipaddr ipaddr ${1} || ipaddr=x
network_get_gateway gateway ${1} || gateway=x
@@ -892,7 +924,7 @@ monitor_wan() {
fi
[ "$health_monitor" = 'serial' ] && {
wan_monitor_map=$(echo $wan_monitor_map | sed -e "s/$1\[\w*\]/$1\[$(date +%s)\]/g")
wan_monitor_map=$(echo $wan_monitor_map | sed -e "s/\(^\|.*\]\)${1}\[\w*\]/\1${1}\[$(date +%s)\]/g")
update_cache
break
}

View File

@@ -42,6 +42,10 @@ define Package/natalie-dect
DEPENDS:=bcmkernel
endef
define Package/natalie-dect/config
source "$(SOURCE)/Config.in"
endef
define Package/natalie-dect/description
Kernel dect driver
endef
@@ -51,13 +55,16 @@ define Build/Compile
endef
endif
define Package/natalie-dect/install
mkdir -p $(1)/lib/modules/$(BCM_KERNEL_VERSION)/extra/
ifeq ($(CONFIG_NATALIE_OPEN),y)
define Package/natalie-dect/install
$(INSTALL_DIR) $(1)/lib/modules/$(BCM_KERNEL_VERSION)/extra
$(CP) $(PKG_BUILD_DIR)/dect.ko $(1)/lib/modules/$(BCM_KERNEL_VERSION)/extra/dect.ko
else
$(CP) $(PKG_BUILD_DIR)/NatalieFpCvm6362/Src/Projects/NatalieV3/FpCvm/Linux6362/dects.ko $(1)/lib/modules/$(BCM_KERNEL_VERSION)/extra/dect.ko
endif
endef
else
define Package/natalie-dect/install
$(INSTALL_DIR) $(1)/lib/modules/$(BCM_KERNEL_VERSION)/extra
$(CP) $(PKG_BUILD_DIR)/NatalieFpCvm6362/Src/Projects/NatalieV3/FpCvm/Linux6362/dects.ko $(1)/lib/modules/$(BCM_KERNEL_VERSION)/extra/dect.ko
endef
endif
$(eval $(call BuildPackage,natalie-dect))

View File

@@ -6,9 +6,9 @@ include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=questd
PKG_VERSION:=3.1.22
PKG_VERSION:=3.1.28
PKG_SOURCE_VERSION:=70ad526e6f44a98f03944f535add1712295dd3ec
PKG_SOURCE_VERSION:=74cd9925cf99f48e2241b4430b6bf3134790122a
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=http://public.inteno.se:/questd
@@ -19,20 +19,20 @@ PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
include $(INCLUDE_DIR)/package.mk
ifeq ($(CONFIG_TARGET_iopsys_brcm63xx_mips),y)
QUESTD_CLFAGS:=-DIOPSYS_BROADCOM
QUESTD_CFLAGS:=-DIOPSYS_BROADCOM
KERNEL_DIR:=$(BUILD_DIR)/bcmkernel/bcm963xx
else ifeq ($(CONFIG_TARGET_iopsys_brcm63xx_arm),y)
QUESTD_CLFAGS:=-DIOPSYS_BROADCOM
QUESTD_CFLAGS:=-DIOPSYS_BROADCOM
else ifeq ($(CONFIG_TARGET_iopsys_linksys),y)
QUESTD_CLFAGS:=-DIOPSYS_MARVELL
QUESTD_CFLAGS:=-DIOPSYS_MARVELL
else ifeq ($(CONFIG_TARGET_lantiq_xrx500),y)
QUESTD_CLFAGS:=-DIOPSYS_LANTIQ
QUESTD_CFLAGS:=-DIOPSYS_LANTIQ
else
$(info (UNEXPECTED CONFIG TARGET))
endif
export KERNEL_DIR
export QUESTD_CLFAGS
export QUESTD_CFLAGS
define Package/questd
CATEGORY:=Utilities

View File

@@ -11,6 +11,8 @@ start_service() {
procd_set_param command "/sbin/questd"
procd_set_param respawn
procd_close_instance
pidof questd-monitor > /dev/null 2>&1 || /sbin/questd-monitor &
}
stop() {

159
questd/files/sbin/questd-monitor Executable file
View File

@@ -0,0 +1,159 @@
#!/bin/sh
# 1. sleep for $SLEEP_LONG seconds
# 2. run the check_* functions
# 3. sleep for $SLEEP_SHORT seconds
# 4. go to step 2. $SAMPLES-1 times (step 2. will run $SAMPLES times)
# 5. go to step 1.
SAMPLES=4
SLEEP_SHORT=2
SLEEP_LONG=10
# worst-case scenario:
# quest will be restarted in:
# SLEEP_LONG + (SAMPLES-1)*SLEEP_SHORT + UBUS_TIMEOUT + epsilon =
# = 21 seconds
# number of process
NPROC_LIMIT=2 # the value that is considered to be wrong (and above)
NPROC_COUNT=4 # number of time that the NPROC_LIMIT has to be hit to trigger a process restart
NPROC_NFAIL=0 # current consecutive Number of FAILures. process restarts when NPROC_NFAIL == NPROC_COUNT
# memmory limit
MEM_LIMIT=50000
MEM_COUNT=4
MEM_NFAIL=0
# procentage of CPU usage
PCPU_LIMIT=38
PCPU_COUNT=4
PCPU_NFAIL=0
UBUS_TIMEOUT=5
restart_questd()
{
logger -s -t $0[$$] "Restarting questd. $NPROC_NFAIL $MEM_NFAIL $PCPU_NFAIL"
/etc/init.d/quest stop
killall -q -KILL questd
/etc/init.d/quest start
NPROC_NFAIL=0
MEM_NFAIL=0
PCPU_NFAIL=0
}
check_nproc()
{
local nproc="$@"
if [ "$nproc" -ge "$NPROC_LIMIT" ]; then
NPROC_NFAIL=$((NPROC_NFAIL + 1))
else
NPROC_NFAIL=0
fi
[ "$NPROC_NFAIL" -ge "$NPROC_COUNT" ] && return 1
return 0
}
check_mem()
{
local mem="$@"
local ok=true
for m in $mem; do
if [ "$m" -ge "$MEM_LIMIT" ]; then
ok=false
break
fi
done
[ "$ok" = "true" ] && MEM_NFAIL=0
[ "$ok" = "false" ] && MEM_NFAIL=$((MEM_NFAIL + 1))
[ "$MEM_NFAIL" -ge "$MEM_COUNT" ] && return 1
return 0
}
check_pcpu()
{
local pcpu="$@"
local ok=true
for p in $pcpu; do
p=${p%%%*}
if [ "$p" -ge "$PCPU_LIMIT" ]; then
ok=false
break
fi
done
[ "$ok" = "true" ] && PCPU_NFAIL=0
[ "$ok" = "false" ] && PCPU_NFAIL=$((PCPU_NFAIL + 1))
[ "$PCPU_NFAIL" -ge "$PCPU_COUNT" ] && return 1
return 0
}
check_ubuscall()
{
local rv
ubus -t $UBUS_TIMEOUT call router.system info >/dev/null 2>&1
rv=$?
[ "$rv" = "0" ] && return 0
return 1
}
main()
{
local topline nproc mem pcpu
local restart_nproc restart_mem restart_pcpu
local sample=1
while true ; do
# collect info
topline=$(top -bn1 | grep "/sbin/[q]uestd" | grep -v monitor)
nproc=$(echo "$topline" | wc -l)
check_nproc $nproc
restart_nproc=$?
mem=$(echo -en "$topline" | awk '{print $5}')
check_mem $mem
restart_mem=$?
pcpu=$(echo -en "$topline" | awk '{print $7}')
check_pcpu $pcpu
restart_pcpu=$?
# do the restart
if [ "$restart_nproc" = "1" -o \
"$restart_mem" = "1" -o \
"$restart_pcpu" = "1" ]
then
check_ubuscall || restart_questd
fi
# sleep
if [ "$sample" -lt "$SAMPLES" ]; then
sample=$((sample + 1))
sleep $SLEEP_SHORT
else
sample=1
sleep $SLEEP_LONG
fi
done
}
main $@

View File

@@ -1,25 +1,25 @@
AUS;19x
BEL;09xx
BRA;05xx
AUS;19x+
BEL;09xx+
BRA;05xx+
CHL;
CHN;
CZE;9xx
DNK;90xx
CZE;9xx+
DNK;90xx+
ETS;
FIN;0(7[0,5]|[1-3,6]0)
FRA;0[8,9]xx
DEU;0(9xx|137)
HUN;06-[8,9]x
FIN;0(7[0,5]|[1-3,6]0)x+
FRA;0[8,9]xx+
DEU;0(9xx|137)x+
HUN;06-[8,9]x+
IND;
ITA;8
JPN;0990
NLD;09xx
NZL;0900
USA;1-900
ESP;([8,9]0x|118)
SWE;09xx
CHE;09xx
NOR;82x
TWN;020[3,4,9]
GBR;0[8,9]xx
ARE;[2,6]00
JPN;0990x+
NLD;09xx+
NZL;0900x+
USA;1-900x+
ESP;([8,9]0x|118)x+
SWE;90510,09(00|39|44)x+,099x+
CHE;09xx+
NOR;82x+
TWN;020[3,4,9]x+
GBR;0[8,9]xx+
ARE;[2,6]00x+

View File

@@ -0,0 +1,5 @@
[syslog]
facility = local0
priority = cdr
template = "callId:${CDR(clid)}, src:${CDR(src)}, dst:${CDR(dst)}, dstContext:${CDR(dcontext)}, chan:${CDR(channel)}, dstChan:${CDR(dstchannel)},$ app:${CDR(lastapp)}, arg:${CDR(lastdata)}, start:${CDR(start)}, answ:${CDR(answer)}, end:${CDR(end)}, duration:${CDR(duration)}, billsec:${CDR(billsec)}, dispos:${CDR(disposition)}, amaflag:${CDR(amaflags)}, accCode:${CDR(accountcode)}, uniqId:${CDR(uniqueid)}, userfield:${CDR(userfield)}"

View File

@@ -167,3 +167,6 @@ config 'sip_service_provider' 'sip0'
option 'is_fax' '0'
option 'transport' 'udp'
config cdr_log 'CDR_LOG'
option cdr_syslog '0'

View File

@@ -66,6 +66,7 @@ TMPL_QUEUE=$TEMPLATEDIR/queue.TEMPLATE
TMPL_ASTERISK=$TEMPLATEDIR/asterisk.conf.TEMPLATE
TMPL_CDR=$TEMPLATEDIR/cdr.conf.TEMPLATE
TMPL_CDR_SYSLOG=$TEMPLATEDIR/cdr_syslog.conf.TEMPLATE
TMPL_INDICATIONS=$TEMPLATEDIR/indications.conf.TEMPLATE
TMPL_LOGGER=$TEMPLATEDIR/logger.conf.TEMPLATE
TMPL_MANAGER=$TEMPLATEDIR/manager.conf.TEMPLATE
@@ -142,6 +143,7 @@ assemble_and_copy_config()
# Copy the template files which we don't edit.
cp $TMPL_ASTERISK $WORKDIR/asterisk.conf
cp $TMPL_CDR $WORKDIR/cdr.conf
cp $TMPL_CEL $WORKDIR/cel.conf
cp $TMPL_INDICATIONS $WORKDIR/indications.conf
cp $TMPL_MANAGER $WORKDIR/manager.conf
cp $TMPL_MODULES $WORKDIR/modules.conf
@@ -843,6 +845,7 @@ encrypt_password()
if [ -e /usr/bin/voicesec ] ; then
echo "Encrypting password for $1"
/usr/bin/voicesec -e $secret > /usr/lib/asterisk/voicesec_$1
fsync /usr/lib/asterisk/voicesec_$1
fi
uci_remove voice_client $1 secret
uci_commit voice_client
@@ -1116,6 +1119,21 @@ configure_cdr()
{
mkdir -p /var/log/asterisk/cdr-csv
touch /var/log/asterisk/cdr-csv/Master.csv
local cdr_syslog
config_get cdr_syslog CDR_LOG cdr_syslog
echo "cdr_syslog: $cdr_syslog"
if [ -z "$cdr_syslog" ] ; then
cdr_syslog='0'
fi
# Enable/disable CDR logging in syslog
if [ "$cdr_syslog" == "1" ] ; then
cp $TMPL_CDR_SYSLOG $WORKDIR/cdr_syslog.conf
fi
}
#
@@ -1200,7 +1218,7 @@ configure_call_filters()
# All x characters are replaced with [0-9] to match a single digit
srn="($(echo $srn | tr -s "" | tr "," "|" | sed 's/x/[0-9]/g'))"
echo "exten => s,n,GotoIf($[\"\${ARG1}\":\"(^$srn[0-9]+)\">0]?special-rate:normal-rate)" >> $WORKDIR/macros.tmp
echo "exten => s,n,GotoIf($[\"\${ARG1}\":\"(^$srn$)\">0]?special-rate:normal-rate)" >> $WORKDIR/macros.tmp
echo "exten => s,n(special-rate),Set(SPECRATE=1)" >> $WORKDIR/macros.tmp
echo "exten => s,n,MacroExit()" >> $WORKDIR/macros.tmp
echo "exten => s,n(normal-rate),Set(SPECRATE=0)" >> $WORKDIR/macros.tmp