Module: sip-router
Branch: master
Commit: 550db5cb1599619a285144cc14677b89eefcf33b
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=550db5c…
Author: Juha Heinanen <jh(a)tutpro.com>
Committer: Juha Heinanen <jh(a)tutpro.com>
Date: Thu Jun 10 13:05:05 2010 +0300
modules/lcr: major rewrite
- For easier management, information is now kept in three tables:
lcr_rule, lcr_rule_target, and lcr_gw.
- For simplicity, gateway groups are not anymore supported.
- Added possibility to stop trying to match shorter prefixes, when a
matching prefix is found.
- Stripping and tagging can be controlled by a flag.
- New database schema and upgrade script will be provided
later today.
---
modules/lcr/README | 596 ++++++++++-------
modules/lcr/doc/lcr_admin.xml | 423 ++++++++----
modules/lcr/hash.c | 168 ++++--
modules/lcr/hash.h | 30 +-
modules/lcr/lcr_mod.c | 1507 ++++++++++++++++++++++-------------------
modules/lcr/lcr_mod.h | 56 +-
modules/lcr/lcr_rpc.c | 235 ++++---
modules/lcr/lcr_rpc.h | 12 +-
8 files changed, 1753 insertions(+), 1274 deletions(-)
Diff: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commitdiff;h=550…
Module: sip-router
Branch: andrei/raw_sock
Commit: fb20a055a029198cbc9dd5c755c3806fbb1e80cf
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=fb20a05…
Author: Andrei Pelinescu-Onciul <andrei(a)iptel.org>
Committer: Andrei Pelinescu-Onciul <andrei(a)iptel.org>
Date: Wed Jun 9 22:58:55 2010 +0200
raw sockets: get dst. ip from the ip header
Get the destination ip from the packet header (when using
IP_HDRINCL we don't set PKT_INFO so we don't have the destination
information).
---
raw_sock.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/raw_sock.c b/raw_sock.c
index fb357c0..e8b90b1 100644
--- a/raw_sock.c
+++ b/raw_sock.c
@@ -284,9 +284,13 @@ int raw_udp4_recv(int rsock, char** buf, int len, union sockaddr_union* from,
/* advance buf */
*buf=udp_payload;
n=(int)(end-*buf);
+ /* fill ip from the packet (needed if no PKT_INFO is used) */
+ dst_ip.af=AF_INET;
+ dst_ip.len=4;
+ dst_ip.u.addr32[0]=iph.daddr;
/* fill dst_port */
dst_port=ntohs(udph.dest);
- su_setport(to, dst_port);
+ ip_addr2su(to, &dst_ip, port);
/* fill src_port */
src_port=ntohs(udph.source);
su_setport(from, src_port);
i tried to push a commit, but push failed like this:
$ eg push
jh(a)git.sip-router.org's password:
Counting objects: 9, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (5/5), done.
Writing objects: 100% (5/5), 1.19 KiB, done.
Total 5 (delta 4), reused 0 (delta 0)
error: hooks/update exited with error code 1
error: hook declined to update refs/heads/master
To ssh://jh@git.sip-router.org/sip-router
! [remote rejected] master -> master (hook declined)
error: failed to push some refs to 'ssh://jh@git.sip-router.org/sip-router'
the error message does not say anything useful to normal user.
-- juha