Hello community,
here is the log from the commit of package udpspeeder for openSUSE:Factory
checked in at 2020-07-29 17:20:54
Comparing /work/SRC/openSUSE:Factory/udpspeeder (Old)
and /work/SRC/openSUSE:Factory/.udpspeeder.new.3592 (New)
Package is "udpspeeder"
Wed Jul 29 17:20:54 2020 rev:2 rq:823220 version:20200714.0
Changes:
--- /work/SRC/openSUSE:Factory/udpspeeder/udpspeeder.changes2019-04-04
14:13:27.369329167 +0200
+++ /work/SRC/openSUSE:Factory/.udpspeeder.new.3592/udpspeeder.changes
2020-07-29 17:22:42.108674062 +0200
@@ -1,0 +2,7 @@
+Thu Jul 16 17:39:30 UTC 2020 - Martin Hauke
+
+- Update to version 20200714.0
+ * fix --key option (the longer form of -k) not working
+ * new options --out-addr --out-interface.
+
+---
Old:
udpspeeder-20190121.0.tar.gz
New:
udpspeeder-20200714.0.tar.gz
Other differences:
--
++ udpspeeder.spec ++
--- /var/tmp/diff_new_pack.qqHqGA/_old 2020-07-29 17:22:44.268675920 +0200
+++ /var/tmp/diff_new_pack.qqHqGA/_new 2020-07-29 17:22:44.272675923 +0200
@@ -1,6 +1,7 @@
#
# spec file for package udpspeeder
#
+# Copyright (c) 2020 SUSE LLC
# Copyright (c) 2019, Martin Hauke
#
# All modifications and additions to the file contributed by third parties
@@ -12,11 +13,12 @@
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
-# Please submit bugfixes or comments via http://bugs.opensuse.org/
+# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
+
Name: udpspeeder
-Version:20190121.0
+Version:20200714.0
Release:0
Summary:A tunnel which can improve network quality by using FEC
# Bundled libev is licenced under GPL-3.0+ or BSD-2-Clause
++ udpspeeder-20190121.0.tar.gz -> udpspeeder-20200714.0.tar.gz ++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/UDPspeeder-20190121.0/common.cpp
new/UDPspeeder-20200714.0/common.cpp
--- old/UDPspeeder-20190121.0/common.cpp2019-01-21 01:19:10.0
+0100
+++ new/UDPspeeder-20200714.0/common.cpp2020-07-14 07:33:59.0
+0200
@@ -495,25 +495,31 @@
return (uint64_t(tmp_time.tv_sec))*1000llu*1000llu+
(uint64_t(tmp_time.tv_nsec))/1000llu;
}*/
-u64_t get_current_time()//ms
+u64_t get_current_time_us()
{
- //timespec tmp_time;
- //clock_gettime(CLOCK_MONOTONIC, _time);
- //return
((u64_t)tmp_time.tv_sec)*1000llu+((u64_t)tmp_time.tv_nsec)/(1000*1000llu);
- return (u64_t)(ev_time()*1000);
-}
+static u64_t value_fix=0;
+static u64_t largest_value=0;
-u64_t get_current_time_rough()//ms
-{
- return (u64_t)(ev_now(ev_default_loop(0))*1000);
+u64_t raw_value=(u64_t)(ev_time()*1000*1000);
+
+u64_t fixed_value=raw_value+value_fix;
+
+if(fixed_value< largest_value)
+{
+value_fix+= largest_value- fixed_value;
+}
+else
+{
+largest_value=fixed_value;
+}
+
+ //printf("<%lld,%lld,%lld>\n",raw_value,value_fix,raw_value +
value_fix);
+return raw_value + value_fix; //new fixed value
}
-u64_t get_current_time_us()
+u64_t get_current_time()
{
- //timespec tmp_time;
- //clock_gettime(CLOCK_MONOTONIC, _time);
- //return (uint64_t(tmp_time.tv_sec))*1000llu*1000llu+
(uint64_t(tmp_time.tv_nsec))/1000llu;
- return (u64_t)(ev_time()*1000*1000);
+ return get_current_time_us()/1000lu;
}
u64_t pack_u64(u32_t a,u32_t b)
@@ -947,7 +953,7 @@
int yes = 1;
if (::bind(fd, (struct sockaddr*) , addr.get_len()) == -1) {
- mylog(log_fatal,"socket bind error\n");
+ mylog(log_fatal,"socket bind error=%s\n",get_sock_error());
//perror("socket bind error");
myexit(1);
}
@@ -958,13 +964,28 @@
return 0;
}
-int new_connected_socket2(int ,address_t )
+int new_connected_socket2(int ,address_t ,address_t *bind_addr,char *
interface_string)
{
fd = socket(addr.get_type(), SOCK_DGRAM, IPPROTO_UDP);
if (fd < 0) {
mylog(log_warn, "[%s]create udp_fd error\n", addr.get_str());
return -1;
}
+
+ if (bind_addr && ::bind(fd, (struct sockaddr*) _addr->inner,
bind_addr->get_len()) == -1) {
+ mylog(log_fatal,"socket bind error=%s\n", get_sock_error());
+ //perror("socket bind error");
+ myexit(1);
+ }
+
+#ifdef __linux__
+ if (interface_string && ::setsockopt(fd, SOL_SOCKET, SO_BINDTODEVICE,
interface_string, strlen(interface_string))