port: Don't take the interval from unicast sync messages.
According to the standard, unicast Sync messages are to be sent with the interval field set to 127. This patch adds a test to avoid incorrectly adopting that value as a new interval. Signed-off-by: Richard Cochran <richardcochran@gmail.com>
This commit is contained in:
		
							parent
							
								
									494643d1fb
								
							
						
					
					
						commit
						28ddb51567
					
				
							
								
								
									
										3
									
								
								port.c
									
									
									
									
									
								
							
							
						
						
									
										3
									
								
								port.c
									
									
									
									
									
								
							@ -2150,7 +2150,8 @@ void process_sync(struct port *p, struct ptp_message *m)
 | 
				
			|||||||
		return;
 | 
							return;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (m->header.logMessageInterval != p->log_sync_interval) {
 | 
						if (!msg_unicast(m) &&
 | 
				
			||||||
 | 
						    m->header.logMessageInterval != p->log_sync_interval) {
 | 
				
			||||||
		p->log_sync_interval = m->header.logMessageInterval;
 | 
							p->log_sync_interval = m->header.logMessageInterval;
 | 
				
			||||||
		clock_sync_interval(p->clock, p->log_sync_interval);
 | 
							clock_sync_interval(p->clock, p->log_sync_interval);
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user