<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Recent changes to patches</title><link>https://sourceforge.net/p/ptpd/patches/</link><description>Recent changes to patches</description><atom:link href="https://sourceforge.net/p/ptpd/patches/feed.rss" rel="self"/><language>en</language><lastBuildDate>Mon, 15 Feb 2016 11:00:30 -0000</lastBuildDate><atom:link href="https://sourceforge.net/p/ptpd/patches/feed.rss" rel="self" type="application/rss+xml"/><item><title>#59 fix snprintf return value misuse</title><link>https://sourceforge.net/p/ptpd/patches/59/?limit=25#dac6</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;Thanks for this Yuriy,&lt;/p&gt;
&lt;p&gt;We will get this pushed, however PTPd has moved to github now: &lt;a href="https://github.com/ptpd/ptpd" rel="nofollow"&gt;https://github.com/ptpd/ptpd&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Thanks,&lt;br/&gt;
Wojciech&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Wojciech Owczarek</dc:creator><pubDate>Mon, 15 Feb 2016 11:00:30 -0000</pubDate><guid>https://sourceforge.net3ae17f8833d65a2be5e583577cc8b11f4f48a76a</guid></item><item><title>fix snprintf return value misuse</title><link>https://sourceforge.net/p/ptpd/patches/59/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;When error happens or formatted string would be larger than supplied buffer, snprintf returns -1 or value larger than supplied buffer size.&lt;br/&gt;
If this value is used without validating its range (by adding to pointer/etc), bad things will happen.&lt;br/&gt;
Attached patch (against svn trunk) fixes all cases I've found. Compile-tested only. I have not tried to check if any of changed code was exploitable.&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Yuriy Kaminskiy</dc:creator><pubDate>Mon, 15 Feb 2016 02:47:09 -0000</pubDate><guid>https://sourceforge.net2b5dcd44ab42ba7539e5bd53c630f279b67c4dc0</guid></item><item><title>#6 simple qnx port</title><link>https://sourceforge.net/p/ptpd/patches/6/?limit=25#f3c4</link><description>&lt;div class="markdown_content"&gt;&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;status&lt;/strong&gt;: open --&amp;gt; closed&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;assigned_to&lt;/strong&gt;: kendall --&amp;gt; Wojciech Owczarek&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Group&lt;/strong&gt;:  --&amp;gt; 2.3.2&lt;/li&gt;
&lt;/ul&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Wojciech Owczarek</dc:creator><pubDate>Thu, 15 Oct 2015 02:43:24 -0000</pubDate><guid>https://sourceforge.netff1d06919c0234c13d4cd50feabd562fabbaf0e3</guid></item><item><title>#57 Support ptpd on Qnx 6.5.0</title><link>https://sourceforge.net/p/ptpd/patches/57/?limit=25#326b</link><description>&lt;div class="markdown_content"&gt;&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;status&lt;/strong&gt;: open --&amp;gt; closed&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;assigned_to&lt;/strong&gt;: Wojciech Owczarek&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Group&lt;/strong&gt;: v2 --&amp;gt; 2.3.2&lt;/li&gt;
&lt;/ul&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Wojciech Owczarek</dc:creator><pubDate>Thu, 15 Oct 2015 02:41:18 -0000</pubDate><guid>https://sourceforge.netb81ebdee97a003f3956f4b199c9ca22fcce7ca97</guid></item><item><title>#58 hybrid mode - bind to interface</title><link>https://sourceforge.net/p/ptpd/patches/58/?limit=25#5f5f</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;Christian,&lt;/p&gt;
&lt;p&gt;Just to be precise, here's the background and what happens on some systems in testing (ignore this if this is obvious to you):&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;PTPd when running with no support for hardware timestamping, or transmit timestamping, must receive its own packets to estimate transmission time. This is needed for Sync in master state, and for Delay Request in slave state. The key in hybrid mode is that Sync is multicast but DelayReq is unicast&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;For multicast packets, the socket option ip_multicast_loop automatically feeds the transmitted packets back into the socket.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;For unicast packets, we must manually send the packets to ourselves - those packets come in via the loopback interface. This is where the problem starts.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;to make sure multicast packets always go out via the specified interface, we use so_bindtodevice. this allows you to run multiple Multicast streams for the same group over different interfaces.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;when you set so_bindtodevice, the manual packet loopback does not work anymore on some kernels: the packets to self on loopback interface are not being received anymore&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;So as you see:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;any mode that sends multicast event messages, needs so_bindtodevice to support multiple interfaces&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;any mode that sends unicast event messages, cannot use so_bindtodevice&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;This is a problem because 1. describes a hybrid master and 2. describes a hybrid slave. A decision had to be made in the code, and that decision was made in favour of the slave.&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Wojciech Owczarek</dc:creator><pubDate>Mon, 06 Jul 2015 21:47:35 -0000</pubDate><guid>https://sourceforge.netd9cae55d1d840507eedfcb02cac05ac1c3ca3dd0</guid></item><item><title>#58 hybrid mode - bind to interface</title><link>https://sourceforge.net/p/ptpd/patches/58/?limit=25#7839</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;Multicast may be your safest bet here - not only it fixes your issue, but also because "hybrid" is not yet standard - this is going to be the operation of the Enterprise Profile, which has not been ratified yet. If you're planning to interoperate with other vendors' PTP, multicast may also be a good choice.&lt;/p&gt;
&lt;p&gt;What could potentially be done is in hybrid mode, to set bindtodevice for masteronly, and not set it for slaveonly. For masterslave this is tough.&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;
Wojciech&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Wojciech Owczarek</dc:creator><pubDate>Mon, 06 Jul 2015 13:47:53 -0000</pubDate><guid>https://sourceforge.net50fd971ec330f3d5b230023505dd046d5af5b055</guid></item><item><title>#58 hybrid mode - bind to interface</title><link>https://sourceforge.net/p/ptpd/patches/58/?limit=25#3134</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;Christian,&lt;/p&gt;
&lt;p&gt;I suggest running final 2.3.1 and repeating the tests. Between RC3 and final, a lot of fixes have been put in place. &lt;/p&gt;
&lt;p&gt;Domain mismatch errors are seen when a device sees packets for a different domain than it is configured for. This would make sense when you're running two hybrid masters on the same host without bindtodevice: traffic from both masters probably goes out via the same interface.&lt;/p&gt;
&lt;p&gt;This is going to be very difficult to resolve, because SO_BINDTODEVICE affects the way packets are looped back to PTPd  - which is necessary for Delay Request packets in hybrid mode. &lt;/p&gt;
&lt;p&gt;What I'm saying is that your change will fix things on the master side, but break things on the slave side. When using the masterslave preset, we cannot switch the IP options on the fly. In general, the network transport should be untouched once started.&lt;/p&gt;
&lt;p&gt;Does your host support libpcap? That would be an easy solution here. Otherwise full multicast - or you can run your master with a modified PTPd and slave unmodified.&lt;/p&gt;
&lt;p&gt;Finally, do the IP addresses of your masters change by any chance? If they do, PTPd has no way of knowing about this currently when running as master. Slave will reset its network transport and pick up interface changes, but master has no way to know this, as it does need to receive any data to be master, so has nothing to check.&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Wojciech Owczarek</dc:creator><pubDate>Mon, 06 Jul 2015 13:29:29 -0000</pubDate><guid>https://sourceforge.netc7b13c1959ec878743ed6811e5b7ade3232810da</guid></item><item><title>#58 hybrid mode - bind to interface</title><link>https://sourceforge.net/p/ptpd/patches/58/?limit=25#0d0a</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;thank you for your response! The server is a custom embedded Linux system with 2.6.27 on a PPC (big endian) and the clients run embedded Linux 2.6.20 on a MIPS (little endian). The server does not know the client IP addresses (network configuration is done with avahi).&lt;br /&gt;
The ptpd hybrid mode looks very useful for this scenario: the server broadcasts to all clients and the clients reply with unicast. The idea is to use eth0.11 to connect all servers and let the one server define the system time (masterslave, domain 0). &lt;br /&gt;
A server can have one or more clients on eth0.22 (server is always master, clients always slave on domain 1).&lt;/p&gt;
&lt;p&gt;I ran tests with hybrid mode on several systems for 2-3 week with 2.3.1-rc3. After system startup, ptpd could successfully synchronize the slave with the master. The "Offset from master" value in the status log on the client stopped being updated sometimes after a few hours (a restart of ptpd on all clients and servers was necessary to recover), sometimes it worked flawlessly for days.&lt;/p&gt;
&lt;p&gt;Sending "kill -USR2" to the ptpd on the server showed high "domainMismatchErrors" values in the logs. After switching to multicast mode (or applying the patch), the domain mismatch errors disappeared. &lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;
Christian&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Christian Scheurer</dc:creator><pubDate>Mon, 06 Jul 2015 13:15:03 -0000</pubDate><guid>https://sourceforge.netd82bbcaca4ff87aa01dbca279da3b4589fc835e1</guid></item><item><title>#58 hybrid mode - bind to interface</title><link>https://sourceforge.net/p/ptpd/patches/58/?limit=25#8d86</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;One thing worth mentioning is that as of PTPd 2.3.1 you can also run in unicast mode with multiple slaves:&lt;/p&gt;
&lt;p&gt;Master: &lt;/p&gt;
&lt;p&gt;ptpengine:ip_mode=unicast&lt;br /&gt;
ptpmode:unicast_negotiation=y&lt;br /&gt;
ptpmode:disable_bmca=y&lt;br /&gt;
ptpengine:preset=masteronly&lt;/p&gt;
&lt;p&gt;Slave:&lt;/p&gt;
&lt;p&gt;ptpengine:ip_mode=unicast&lt;br /&gt;
ptpmode:unicast_negotiation=y&lt;br /&gt;
ptpengine:preset=slaveonly&lt;br /&gt;
ptpengine:unicast_destinations"ip1,ip2,..."&lt;/p&gt;
&lt;p&gt;The slaves will then request unicast transmission from the GM.&lt;/p&gt;
&lt;p&gt;This effectively enables the Telecom profile, which may be easier to deploy where multicast routing is not possible or difficult to run.&lt;/p&gt;
&lt;p&gt;In your scenario you have PTPd running on two tagged subinterfaces over the same physical, so the clock ID will be the same because of the same MAC. You should probably avoid that by setting different port numbers for both instances:&lt;/p&gt;
&lt;p&gt;ptpengine:port_number=1 - first instance&lt;br /&gt;
ptpengine:port_number=2 - second instance, etc.&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;
Wojciech&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Wojciech Owczarek</dc:creator><pubDate>Mon, 06 Jul 2015 12:37:15 -0000</pubDate><guid>https://sourceforge.net412b1e30d7ebaeba62d7fa1c764c12b980132d88</guid></item><item><title>#58 hybrid mode - bind to interface</title><link>https://sourceforge.net/p/ptpd/patches/58/?limit=25#f3b2</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;OK, I think I replied before I looked into this in more detail. The problem with this code most likely exists only on the master, not on the slave.&lt;/p&gt;
&lt;p&gt;Will run some more tests.&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;
Wojciech&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Wojciech Owczarek</dc:creator><pubDate>Mon, 06 Jul 2015 12:29:03 -0000</pubDate><guid>https://sourceforge.netb95cccf23103a2705360612dc39155bbd6ab790d</guid></item></channel></rss>