Coder Social home page Coder Social logo

ffdd-bmxd's Introduction

ffdd_bmxd

bmxd - Freifunk-Dresden

This is the modified version of B.A.T.M.A.N Experimental (BMX) originally created by Copyright (C) 2007 Axel Neumann <axel (at) open-mesh.net>

Any modifification of this sources are made by Copyright (c) 2007-2022 Stephan Enderlein

The work is licensed under: Creative Commons BY-NC-SA-2.0 http://creativecommons.org/licenses/by-nc-sa/2.0/

The modification includes:

  • list handling rework
  • fixing memory issues
  • removing unused code and code that does not belong to protocol
  • extension of bmxd protcoll (adding community gateway routes)
  • adding script parameters allowing setting dns and external ipip gateway tunnel
  • and a lot other changes.

The development of experimental version of bmx was abandoned a long time ago by Axel Neumann but used by Freifunk Dresden. Since then the sources are modified to fit requirements for Freifunk Dresden network.

ffdd-bmxd's People

Contributors

ddmesh avatar cremesk avatar

Stargazers

Diego avatar Jefferson Martines avatar Jarrian Gojar avatar Niklas Merkelt avatar  avatar

Watchers

James Cloos avatar Niklas Merkelt avatar  avatar  avatar Mirko avatar

ffdd-bmxd's Issues

batmand hangs 1 sec

(double space after bat0)

bmx[1515]: INFO  del_dev_tun(): closing gwc_cleanup tunnel bat0  ip 169.254.x.x

/etc/init.d/S52batmand check and Internet Connection stopped 1 sec!

LOG:

...
Jan 03 19:00:41 vpn13.freifunk-dresden.de GW_CHECK[1714]: try: 10.10.172.1:vpn0                                                                                                       
Jan 03 19:00:42 vpn13.freifunk-dresden.de bmx[1515]: INFO  using new default tunnel to GW 10.200.200.26 (gw_flags: 63, packet_count: 2, gw_product: 0)                                                   
Jan 03 19:00:42 vpn13.freifunk-dresden.de bmx[1515]: INFO  send ip request to gateway: 10.200.200.26, preferred IP: 0.0.0.0                                                                                                                    
Jan 03 19:00:42 vpn13.freifunk-dresden.de bmx[1515]: INFO  got IP reply: sender 10.200.200.26 ip 10.200.200.26                                                                                                              
Jan 03 19:00:42 vpn13.freifunk-dresden.de bmx[1515]: INFO  got IP 169.254.9.57 (preferred: IP 0.0.0.0) from gateway: 10.200.200.26 for 600 seconds                                    
Jan 03 19:00:42 vpn13.freifunk-dresden.de bmx[1515]: INFO  GWT: GW-client tunnel init succeeded - type: 2WT  dev: bat0  IP: 169.254.9.57  MTU: 1200  GWIP: 10.200.200.26              
Jan 03 19:00:44 vpn13.freifunk-dresden.de GW_CHECK[1958]: ok: true                                                                                                                        
Jan 03 19:00:44 vpn13.freifunk-dresden.de GW_CHECK[1959]: dev_is_vpn: 1                                                                                                                                                                       
Jan 03 19:00:44 vpn13.freifunk-dresden.de GW_CHECK[1962]: Set public gateway: dev:vpn0, ip:10.10.172.1                                                                                                                      
Jan 03 19:00:44 vpn13.freifunk-dresden.de bmx[1515]: INFO  gateway class: 63 -> propagating: 8MBit/8MBit                                                                                                                                      
Jan 03 19:00:44 vpn13.freifunk-dresden.de bmx[1515]: INFO  del_dev_tun(): closing gwc_cleanup tunnel bat0  ip 169.254.9.57                                                                                                                     
Jan 03 19:00:44 vpn13.freifunk-dresden.de rndc[1995]: server reload successful                                                                                                                                                                 
Jan 03 19:00:44 vpn13.freifunk-dresden.de GW_CHECK[2046]: gateway check end.
...

WIP: bmxd: need some correction and a update to router version.

  • bmxd müsste noch auf die gleiche version gebracht welche auf den Routern läuft.
  • Beim bauen von bmxd bekomme ich noch folgende warnings and notes.
  • check issue #1 after this step!

cd /usr/local/src/bmxd/ ; make clean_all ; make ; make strip ; cp -f bmxd /usr/local/bin/

                  In file included from batman.h:31,
                                   from originator.c:27:
                  originator.c: In function 'update_routes':
                  control.h:118:30: warning: suggest braces around empty body in an 'if' statement [-Wempty-body]
                   #define dbgf_all( dbgt, ... ); do { if ( __dbgf_all() ) { _dbgf_all( dbgt, __func__, __VA_ARGS__ ); } } while (0)
                                                ^
                  originator.c:108:9: note: in expansion of macro 'dbgf_all'
                           dbgf_all( DBGT_INFO, "change route to %-15s via %-15s %s %3d / %3d (prev. via %-15s %s %3d)",
                           ^~~~~~~~
                  In file included from schedule.c:32:
                  schedule.c: In function 'wait4Event':
                  os.h:24:25: warning: macro expands to multiple statements [-Wmultistatement-macros]
                   # define timercpy(d, a) (d)->tv_sec = (a)->tv_sec; (d)->tv_usec = (a)->tv_usec;
                                           ^
                  schedule.c:1317:6: note: in expansion of macro 'timercpy'
                        timercpy( tv_stamp, &(mb->tv_stamp) );
                        ^~~~~~~~
                  schedule.c:1316:5: note: some parts of macro expansion are not guarded by this 'else' clause
                       else
                       ^~~~
                  In file included from batman.h:30,
                                   from control.c:36:
                  control.c: In function 'remove_dbgl_node':
                  control.c:95:43: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
                     list_for_each_safe( list_pos, list_tmp, (struct list_head *)&dbgl_clients[i] ) {
                  list-batman.h:98:14: note: in definition of macro 'list_for_each_safe'
                    for (pos = (head)->next, n = pos->next; pos != (struct list_head *)(head); \
                                ^~~~
                  control.c: In function 'debug_output':
                  control.c:595:29: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
                     list_for_each ( list_pos, (struct list_head *)&(dbgl_clients[level]) ) {
                  list-batman.h:87:14: note: in definition of macro 'list_for_each'
                    for (pos = (head)->next; pos != (struct list_head *)(head); \
                                ^~~~
                  control.c: In function '_opt_connect':
                  control.c:1795:3: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
                     if ( cmd == OPT_CHECK )
                     ^~
                  control.c:1798:4: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'
                      Client_mode = YES;
                      ^~~~~~~~~~~
                  posix/tunnel.c: In function 'opt_gw_class':
                  posix/tunnel.c:2194:27: warning: '%s' directive writing 4 bytes into a region of size between 3 and 23 [-Wformat-overflow=]
                     sprintf( gwarg, "%i%s/%i%s",
                                             ^~
                  posix/tunnel.c:2194:3: note: 'sprintf' output between 12 and 32 bytes into a destination of size 30
                     sprintf( gwarg, "%i%s/%i%s",
                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
                              ( download_speed > 2048 ? download_speed / 1024 : download_speed ),
                              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                              ( download_speed > 2048 ? "MBit" : "KBit" ),
                              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                              ( upload_speed > 2048 ? upload_speed / 1024 : upload_speed ),
                              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                              ( upload_speed > 2048 ? "MBit" : "KBit" ) );
                              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
              stdout:
                  make bmxd
                  make[1]: Entering directory '/usr/local/src/bmxd'
                  cc -pedantic -Wall -W -Wno-unused-parameter -Os -g3 -std=gnu99 -I./ -DREVISION_VERSION=\"-src:[497088cbbb]\" -DNODEPRECATED -DNOVIS -c batman.c -o batman.o
                  cc -pedantic -Wall -W -Wno-unused-parameter -Os -g3 -std=gnu99 -I./ -DREVISION_VERSION=\"-src:[497088cbbb]\" -DNODEPRECATED -DNOVIS -c originator.c -o originator.o
                  cc -pedantic -Wall -W -Wno-unused-parameter -Os -g3 -std=gnu99 -I./ -DREVISION_VERSION=\"-src:[497088cbbb]\" -DNODEPRECATED -DNOVIS -c hna.c -o hna.o
                  cc -pedantic -Wall -W -Wno-unused-parameter -Os -g3 -std=gnu99 -I./ -DREVISION_VERSION=\"-src:[497088cbbb]\" -DNODEPRECATED -DNOVIS -c schedule.c -o schedule.o
                  cc -pedantic -Wall -W -Wno-unused-parameter -Os -g3 -std=gnu99 -I./ -DREVISION_VERSION=\"-src:[497088cbbb]\" -DNODEPRECATED -DNOVIS -c plugin.c -o plugin.o
                  cc -pedantic -Wall -W -Wno-unused-parameter -Os -g3 -std=gnu99 -I./ -DREVISION_VERSION=\"-src:[497088cbbb]\" -DNODEPRECATED -DNOVIS -c list-batman.c -o list-batman.o
                  cc -pedantic -Wall -W -Wno-unused-parameter -Os -g3 -std=gnu99 -I./ -DREVISION_VERSION=\"-src:[497088cbbb]\" -DNODEPRECATED -DNOVIS -c allocate.c -o allocate.o
                  cc -pedantic -Wall -W -Wno-unused-parameter -Os -g3 -std=gnu99 -I./ -DREVISION_VERSION=\"-src:[497088cbbb]\" -DNODEPRECATED -DNOVIS -c avl.c -o avl.o
                  cc -pedantic -Wall -W -Wno-unused-parameter -Os -g3 -std=gnu99 -I./ -DREVISION_VERSION=\"-src:[497088cbbb]\" -DNODEPRECATED -DNOVIS -c profile.c -o profile.o
                  cc -pedantic -Wall -W -Wno-unused-parameter -Os -g3 -std=gnu99 -I./ -DREVISION_VERSION=\"-src:[497088cbbb]\" -DNODEPRECATED -DNOVIS -c control.c -o control.o
                  cc -pedantic -Wall -W -Wno-unused-parameter -Os -g3 -std=gnu99 -I./ -DREVISION_VERSION=\"-src:[497088cbbb]\" -DNODEPRECATED -DNOVIS -c metrics.c -o metrics.o
                  cc -pedantic -Wall -W -Wno-unused-parameter -Os -g3 -std=gnu99 -I./ -DREVISION_VERSION=\"-src:[497088cbbb]\" -DNODEPRECATED -DNOVIS -c linux/route.c -o linux/route.o
                  cc -pedantic -Wall -W -Wno-unused-parameter -Os -g3 -std=gnu99 -I./ -DREVISION_VERSION=\"-src:[497088cbbb]\" -DNODEPRECATED -DNOVIS -c posix/posix.c -o posix/posix.o
                  cc -pedantic -Wall -W -Wno-unused-parameter -Os -g3 -std=gnu99 -I./ -DREVISION_VERSION=\"-src:[497088cbbb]\" -DNODEPRECATED -DNOVIS -c posix/tunnel.c -o posix/tunnel.o
                  cc  batman.o originator.o hna.o schedule.o plugin.o list-batman.o allocate.o avl.o profile.o control.o metrics.o linux/route.o posix/posix.o posix/tunnel.o -o bmxd  -Wl,-export-dynamic -ldl -g3 
                  make[1]: Leaving directory '/usr/local/src/bmxd'
                  # further make targets: help, libs, build_all, strip[_libs|_all], install[_libs|_all], clean[_libs|_all]
                  make bmxd
                  make[1]: Entering directory '/usr/local/src/bmxd'
                  make[1]: 'bmxd' is up to date.
                  make[1]: Leaving directory '/usr/local/src/bmxd'
                  # further make targets: help, libs, build_all, strip[_libs|_all], install[_libs|_all], clean[_libs|_all]
                  strip bmxd

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.